SSH through HTTP proxy

Refer to 
https://daniel.haxx.se/docs/sshproxy.html
https://www.pc-freak.net/blog/howto-pass-ssh-traffic-through-secured-corporate-proxy-server-corkscrew-using-sshd-as-proxy/
 

1. Linux by nmap/netcat/nc, corkscrew, connect

Host Dest
        HostName DestIP
        User YourSSHNameonDestIP
        Port 22
        IdentityFile ~/.ssh/id_rsa
        ProxyCommand nc -X connect -x Your_Company_HTTP_Proxy:Port  %h %p
~                                                                                                                                                                                                                  
~                                                                                                                                                                                                                  
~                                                                                                                                                                                                                  
"~/.ssh/config"  

2. Windows

  need connect from git/Mingw or MobaXterm/cygwin or Msys


Windows
     HostName DestIP
     User YourSSHNameonDestIP
     Port 22
     IdentityFile ~/.ssh/id_rsa    
     ProxyCommand  Mxt221\bin\nc.exe -X connect -x Your_Company_HTTP_Proxy:Port  %h %p 

PS C:> $env:path
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseSVN\bin;C:\Users\uie75906\AppData\Local\Microsoft\WindowsApps;;C:\windows\sysnative\;C:\tmp\Mxt221\bin
 

3. Windows through putty 

 Putty->Connection->Proxy->Proxy hostname/Port


版权声明:本文为hushui原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。