Wednesday, January 12, 2011

SSH into a computer behind NAT

Go to your router settings page, e.g 192.168.1.1
Go to the port forwarding setting page, configure following settings


External Port
2225
Internal Port
22
Protocol
tcp/udp
To IP Address
192.168.1.102


You may want to set a normal port, because attacked cannot guess that. If you set 22 to 22, you may have may brute force attacks from outside. Set external port as normal port is more secure. 

Then: 
ssh username(AT)corsairxxv(DOT)gotdns(DOT)com -p 2225
or
scp -r -P 2225 username(AT)corsairxxv(DOT)gotdns(DOT)com:~/work/workspace/ChestTest ~/
scp -P 2225 file.zip corsairxxv.gotdns.com:~/


No comments: