I looked over some questions asked here relating to this issue but couldn't find a solution.
I'm trying to connect to a computer behind a router via SSH knowing only the public IP address (of the router).
Is that possible?
|
Are you the administrator of the remote machine/network? Yes. You need to forward port 22 (or whichever port you're running ssh on) through your firewall. In addition, I suggest doing a few things to make hacking more difficult, such as switching to a different port, allowing public key only, or limiting remote connections to certain IP addresses. Alternatively, you need to set up a VPN to get you through the remote firewall. Alternatively, you may need to first ssh to the remote firewall, then the remote machine from there. If you're only the administrator of that machine, not of the network, you need to ask the network administrator. No. You need to ask the administrator of the remote machine/network how to access it, and if he/she doesn't know, suggest he/she set up one of the above. |
|||
|
|
|
Regarding your ssh output http://pastebin.com/dDxd4GjQ it seems like ssh isn't open on default port 22 on the remote host. (possibly no ssh at all, or a firewall is protecting it). If you have authorisation, you can scan the ports of this host to see if there's a binding ssh port on another port. Something like :
|
|||||
|
ssh <IP>? – sputnick Oct 2 '12 at 20:34ssh -v <IP>and paste it on a pastebin like pastebin.com or in your post. – sputnick Oct 2 '12 at 20:40