tech.gate.io blog

ssh over http proxy

you need to be able to configure iptables or the sshd port on the ssh-server, in order to make this work

 

on the ssh-server:

 

unclean method:

change sshd port to 443

edit sshd_config (/etc/ssh/sshd_config) in most cases

replace Port 22 with Port 443

restart sshd

clean method:

 
check out your proxys external ip(s)

configure your browser to use your proxy

surf to http://www.whatsmyip.com.au/

repeat this after a period of time, since most companies use 2 or more external ips, switching round robin

 
now install iptables, if not already installed

run

EXTERNALIP1=xxx.xxx.xxx.xxx
EXTERNALIP2=xxx.xxx.xxx.xxx

iptables -t nat -A PREROUTING -s $EXTERNALIP1 -p tcp --dport 443 -j REDIRECT --to-port 22

iptables -t nat -A PREROUTING -s $EXTERNALIP2 -p tcp --dport 443 -j REDIRECT --to-port 22

now every attempt from externalip1/2 to port 443 on the ssh-server, ends up in port 22, where our sshd runs

 

Client configuration:

 

Windows:

for Windows use putty
just goto proxy section, choose http-proxy and enter your authentication data in the fields below
then switch to session, and put port 443 in the field next to the servers hostname

Linux:

since putty is available for linux too, the way should be the same, but for me, I want to use openssh from the kde konsole

found this tutorial:

http://www.zeitoun.net/articles/ssh-through-http-proxy/start

in short:

yum install connect-proxy

add to ~/.ssh/config:

## Outside of the firewall, with HTTPS proxy
Host my-ssh-server-host.net
  ProxyCommand connect -H proxy.free.fr:3128 %h 443
## Inside the firewall (do not use proxy)
Host *
   ProxyCommand connect %h %p

now test:

ssh my-ssh-server-host.net

 
takes a while in my case, but then login appears, working fine

 


19 comments


private message
Whoa, whoa, get out the way with that good inofmtraion.



private message
Yg32QC gdbjeqfgvpwf



private message
viagra %-P viagra 21361



private message
koop viagra online zonder recept 964219 Viagra en línea }:(((


private message

My wife and I would like to say Thank you to Heather for helping us find our lovely house, Your professionalism service was terrific ,We are extremely happy and wish you all the best in your career.Shokran & Mo Sleet

buy intravenous tramadol insurance auto auctions



Page: 1/3  [Next]
1  2  3 

Post new comment

Anti-Bot verification code image
Try another code

Last blog post comments

  1. xymon netapp vfiler quota monitoring: rvksjfq sjmgafs 01:26 CEST
  2. Use Windows as router / NAT traffic: vnvrfihp muygzxbi Sat 19 of May, 2012 16:18 CEST
  3. mount nfs v3 share under Solaris 10: kdvwtux xqowacnm Sat 19 of May, 2012 04:21 CEST
  4. Unix Color Terminal: cbeusw ejbpsnr Sat 19 of May, 2012 01:29 CEST
  5. AIX: Get PVID directly from hdisk using od: buy penis enlargement penis_enlargement Fri 18 of May, 2012 15:14 CEST
  6. AIX: Get PVID directly from hdisk using od: risperdal risperdal Fri 18 of May, 2012 13:00 CEST
  7. AIX: Get PVID directly from hdisk using od: cheap phen375 phen375 Wed 16 of May, 2012 18:30 CEST
  8. AIX: Get PVID directly from hdisk using od: Good info Pharmk935 Mon 14 of May, 2012 23:06 CEST
  9. Unix Color Terminal: Good info Pharmd119 Sun 13 of May, 2012 15:49 CEST
  10. Test network throughput without disk or cpu distortion: Good info Pharmd585 Sun 13 of May, 2012 06:01 CEST

Feeds List