I am brand new with the use of SSH.NET, but I fail on the very basics of connecting to SftpClient.Connect:
If i remove the port, I receive a SocketException with a 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <<IP-ADDRESS>>' message.
I have no problem logging on with FileZilla or directly in Windows Explorer.
Is it because the server miss something? I can't seem to find any other settings that should have any impact on the result. The server is my Webhotel, so I do not have full control over it.
using (SftpClient sftp = new SftpClient(Properties.Settings.Default.FTPServer, 21, Properties.Settings.Default.FTPUser, Properties.Settings.Default.FTPPass))
{
try
{
sftp.Connect();
return sftp.ListDirectory(pPath);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
sftp.Disconnect();
}
}
I receive a SshOperationTimeoutException with a 'Socket read operation has timed out' message. If i remove the port, I receive a SocketException with a 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <<IP-ADDRESS>>' message.
I have no problem logging on with FileZilla or directly in Windows Explorer.
Is it because the server miss something? I can't seem to find any other settings that should have any impact on the result. The server is my Webhotel, so I do not have full control over it.