I am using WINSCP to upload files using SFTP. The code was working fine till few days back. Now from the target server there is a server alert fot "Authentication with Pre password --> Using Keyboard Interactive Authentication". Through code there is no way i can select Ok/Cancel for this alert, hence the authentication is failed and connection is getting closed. So how can i turn off Server Alert from my code.
I am using WINSCP Version 4.3.3
// SFTPExecutable needs to be defined in app.config to point to winscp.com
winscp.StartInfo.FileName = ConfigurationManager.AppSettings["SFTPExecutable"];
if (winscp.StartInfo.FileName == null || winscp.StartInfo.FileName.Length == 0)
throw new Exception("from PutSFTP: SFTPExecutable not set in config file");
// Wait until WinSCP finishes
bool ftpStatus = (winscp.ExitCode == 0);
Log message is:
winscp> option confirm off
winscp> open sftp://useranme:pwd$@Server//foldername -hostkey="ssh-rsa 1024 53:da:ad:20:06:4e:fc:bf:9d:4f:6d:72:88:b5:14:26"
Searching for host...
Connecting to host...
Using username "username".
Authenticating with pre-entered password.
Connection has been unexpectedly closed. Server sent command exit status 0.
Authentication log (see session log for details):
Using username "username".[/url]