I haven't yet done this myself so I am not speaking from experience. You might be able to use "Secure Socket Funneling", but it requires setting up a server somewhere that both your socks client and your windows client can reach, and it requires running the SSF client on your windows client.The two categories you'll need to edit are 'Session' and 'ConnectionSSH. When you open PuTTY, you're met with the PuTTY Configuration dialog. Since SSH uses port 22, we'll use each SSH connection to tunnel a local port to the next server's port 22. You could try to find a later version of PLINK hoping that the SOCKS feature has been added to it like it has in OpenSSH 7.6+ The first solution that leaps to mind is to tunnel one local port to each of your servers.You could identify an existing socks proxy that is already doing what you want.You could identify another server on the same network as your windows client that you can connect to with PLINK and run your SOCKS proxy there.You could install an SSH server on your windows client and use localhost above.plink.exe UserNameServerIP -pw PASSWORD -batch -m PATHTOFILEWITHSCRIPT.txt. 1, 2, and 3 work with the changes outlined above, while 4 and 5 require research. I am trying to create a script to login to a remote server and run a command. Alas, this is only available in tools that are build with OpenSSH 7.6+, AFAIK. Second DB at the server with 22 ssh-port, so I deleted '-P 1322' option. For example, to connect to the first DB I must connect with 1322 port at the server. and the SSH client would act as the proxy server (no need for a separate proxy server). OK, but I need to use different plink.exe options to making tunnel. If you were using OpenSSH 7.6 or later, the SSH client does have the SOCKS feature, meaning you could connect back to your client box with the command. Without an SSHd to connect to, you can't do it because PLINK (0.63) is a client that does not have a SOCKS implementation. Furthermore, if you don't know of any SOCKS proxy's serving that network, your options are greatly reduced. For example, localhost does not have an SSHd (server) running and you don't have an account on another SSH enabled server on that network. So, a problem often arises when you don't have an SSH Server on the targeted network that you can connect to. But, to accomplish your goal, which ever server you choose must be on the network you want to proxy. You can replace localhost with another SSH server that can do Dynamic Port Forwarding or you can forward traffic to a SOCKS proxy server. Plink.exe -N -L 8888:SOCKSPROXYIP:SOCKPORT # when a dedicated SOCKS proxy server is available What you would need is the following: plink.exe -N -R 2222:127.0.0.1:8888 -P 22 REMOTEIP And that won't accomplish the reverse dynamic port forwarding you were hoping for. This is an old question, but it keeps coming up.Īs mentioned in the comments to your question, your attempts result in a dynamic port forward to the system you wish to initiate the communications from (the SOCKS client).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |