Differences

This shows you the differences between two versions of the page.

howto:ssh_over_proxy [2010/02/10 13:45]
127.0.0.1 external edit
howto:ssh_over_proxy [2010/04/23 01:48] (current)
kapace Added how to do this using windows source.
Line 1: Line 1:
====== ssh over proxy ====== ====== ssh over proxy ======
 +=== With Putty on Windows (Linux Destination) ===
 +To connect behind a proxy/firewall etc, from Windows (Source) to a Linux Host (Destination):
 +First install Openssh on the linux destination computer, and run it on port 443.
 +Then get the [[http://proxytunnel.sourceforge.net/|Proxytunnel]] Windows binary and run the following command in cmd:
 +
 +(switch PROXY_HOST_OR_IP:PROXY_PORT with your proxy's hostname or ip and port, and DESTINATION with destination ip.)
 +
 +----
 +''proxytunnel.exe -a 1337 -p PROXY_HOST_OR_IP:PROXY_PORT -d DESTINATION:443''
 +
 +Then simply run putty and connect to localhost on port 1337. You should get a login prompt.
 +If for whatever reason it fails, you may have a more restrictive proxy that requires SSL traffic on that port.
 +To get around that, simple use [[http://www.stunnel.org/|stunnel]] to wrap ssh's TCP connection with SSL:
 +
 +On the Linux box (as root):
 +
 +----
 +
 +''stunnel -f -D 7 -d 443 -r 127.0.0.1:22 -p server.pem -N sshd -O 1:TCP_NODELAY=1 -O r:TCP_NODELAY=1''
 +
 +and then on the Windows Box, get stunnel binary and edit the stunnel.conf file:
 +
 +----
 +
 +''
 +client = yes
 +[ssh]
 +accept  = 995
 +connect = 127.0.0.1:1337''
 +
 +Then start stunnel and connect using putty to localhost on port 995.
 +
 +What should happen is that stunnel, will connect to proxytunnel on localhost:1337
 +which will connect to the proxy which will connect to the destination, and get you a shell. At least, it worked for me 8-)
FIXME FIXME
 
howto/ssh_over_proxy.txt · Last modified: 2010/04/23 01:48 by kapace
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki