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

New Post: SSH through Proxy Problem

$
0
0
Hello guys,

im trying to connect through a proxy to my SSH server but i get an exception: "Socket read operation has timed out". In the Java Console i can see that it is connecting to Proxy but cant get connection to server. I tryed to connect with PuTTY using the same configuration and it worked fine. I also tryed another lib "Chilkat" and it worked fine (without KeyAuthentification) too but you have to buy a license to unlock the trial version and other libs dont support proxy functionality..... :(

the code im using:

ConnectionInfo connectionInfo = new ConnectionInfo("xx.xx.xx.xx", 22, "username", ProxyTypes.Http, "127.0.0.1", 18080, "", "", new PasswordAuthenticationMethod("username", "password"));
        try
        {
             using (var ssh = new SshClient(connectionInfo))
            {
                ssh.Connect();

                ssh.RunCommand("ls -l");

                ssh.Disconnect();
            }
        }
        catch (Exception ex)
        {
            Console.WriteLine();
        }
Are there some more ssh-libs that support proxy and are free maybe? or am i doing something wrong with ssh.net (maybe a flag that need to be set or something)?

Thanks in advance

killikax

Viewing all articles
Browse latest Browse all 1729

Trending Articles