ssh tunnel - SSH two computers behind firewalls through external server -
i own 2 computers @ university. both of them behind sort of firewall etc. disallows me directly connect them on network. can both ssh public computers, can't figure out how ssh 1 other. run small website. question is, can use public address of website somehow connect 2 computers without information flowing through website , eating bandwidth? ideally i'd create ssh tunnel between 2 computers.
i've tried hamachi, doesn't play macs anymore , i'd more control on connection.
let's assume want ssh machinea machineb (both @ university) going through serverc (your public server).
you need run sshd on serverc , on machineb.
run following commands, assuming sshd listening on port 22 on machineb , serverc :
# forward incoming connections serverc:22000 machineb:22 (on machineb) ssh -r22000:127.0.0.1:22 -n user@serverc # forward incoming connections 127.0.0.1:22000 serverc:22000 (on machinea) ssh -l22000:127.0.0.1:22000 -n user@serverc # establish link between machinea , machineb (on machinea) ssh -p 22000 user@127.0.0.1
this method needs access port 22, , can change 80 or 443 if university proxy evil.
Comments
Post a Comment