Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: SSH.NET Server requirements / SftpClient.Connect timeout

$
0
0
I am brand new with the use of SSH.NET, but I fail on the very basics of connecting to SftpClient.Connect:
            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.

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>