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

New Post: CONNECTING to SFTP (SSH2) enable server getting System.Net.Sockets.SocketException

$
0
0
Can anybody please help! Here is the message I got when trying to connect. Here is my code:

class Program
{
    static string ip = "10.48.174.23", user = "SD_DCFS", pass = "SDdcfs_EFT";
    static int port = 22;       

    static void Main(string[] args)
    {
        SftpClient sftp = new SftpClient(ip, port, user, pass);
        sftp.Connect();            
         SshNET.Uploader(sftp, inFilePath, directoryPath, "Test.txt");
         sftp.Disconnect();
    }
 }
and here is the message I received:

System.Net.Sockets.SocketException was unhandled
Message=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 10.48.174.23:22
Source=System
ErrorCode=10060
NativeErrorCode=10060
StackTrace:
   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
   at Renci.SshNet.Session.SocketConnect(String host, Int32 port)
   at Renci.SshNet.Session.Connect()
   at Renci.SshNet.BaseClient.Connect()
   at FTP_LAUSD.Program.Main(String[] args) in \\isdowfsv03\d350home\e542938\visual studio 2010\Projects\FTP_LAUSD\Program.cs:line 28
InnerException:

Thanks,
-bill

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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