Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open putty ssh connection over SOCKS5 proxy via command line

I tried to open putty ssh connection over SOCKS5 proxy via command line.

putty.exe -P port -pw password username@host -nc proxyhost:proxyport

This command doesn't work and I think it is incorrect. I tried a lot of variants of this command, but putty user manual doesn't contain necessary information.

I tried to connect to my host throw putty UI and it works fine.

For openSSH similar command looks

ssh -o "ProxyCommand=nc -x proxyhost:proxyport %h %p" -p port username@host
like image 250
Sergey Avatar asked Apr 26 '16 12:04

Sergey


People also ask

How to connect to SSH server through socks or HTTPS proxy?

OpenSSH 's SSH client has the capability to connect through both SOCKS and HTTPS proxy with the use of ProxyCommand option alongside third-party programs such as nc or netcat . Create SOCKS or HTTPS proxy if you dont already have one. Test if the SOCKS or HTTPS proxy is reachable from the SSH client's host.

How do I set up a socks5 proxy on Windows?

On Windows you can use the PuTTY utility. Open the terminal, then connect to your server via SSH and use the SOCKS5 parameter to enable the local SOCKS5 server: The parameter “-D” enables the SOCKS5 local server and it is followed by the local port you want the SOCKS5 proxy to listen on.

How do I connect to SSH using putty?

Open PuTTY, add your server IP/hostname and port if other than 22. In the left column menu, open “Connection > SSH > Tunnels” and add the Source Port (the local port SOCKS5 will listen on) select the checkbox “Dynamic” then Add.

How do I connect to a putty server with Firefox?

Open PuTTY, add your server IP/hostname and port if other than 22. In the left column menu, open “Connection > SSH > Tunnels” and add the Source Port (the local port SOCKS5 will listen on) select the checkbox “Dynamic” then Add. In Firefox, open Preferences > Network Settings or just search for “proxy” in the upper right corner search box.


1 Answers

If I were you I would create a "Saved Session" with Putty and launch it via command line:

putty.exe -load session_name

It will be easier to create a "Saved Session" via the PuTTY interface than toying around with the command line. And it seems like you already have it working through the PuTTY interface.

like image 188
BlakBat Avatar answered Sep 27 '22 20:09

BlakBat