ssh a specific computer on network

Discussion in 'macOS' started by lynkynpark86, Nov 21, 2011.

  1. lynkynpark86 macrumors 6502

    #1
    When I'm using SSH on my network, it's easy to use, just 'ssh root@192.168.0.100', but is there a way to do this on another network, but to that same computer, ie 'ssh root@192.168.0.100 12.345.67.890'?
    I want to access my desktop at home when I'm away, and ssh seems like the best way to do it, but I can't figure it out.
     
  2. costabunny macrumors 68020

    costabunny

    Joined:
    May 15, 2008
    Location:
    Weymouth, UK
    #2
    You will need to setup access from the outside to your local network (router).

    for example setup the router to forward port 22 to the ip of your desktop, then you need to know your routers Public IP address. (most will show you this, but unless your ISP gives you a static IP address; then it can change).

    If you don't have static you might want to look at DynDNS or similar service (you run sw on the computer or set the router to update the dyndns site with your public ip). You have a host name from the dyndns service (for example somename.homeip.net) and this is a link to your public IP.

    When thats done you could 'ssh user@somename.homeip.net' from anywhere.

    I would suggest you make certain you have a strong password on your login (or even better setup public/private key login only); as having port 22 open on your router is a potential security risk.

    for instance on my machine I have key login for my remote user so I can ssh in from my iPad via a dyndns entry. if I were to try accessing my home setup without the key and correct passphrase then I would not be allowed :)

    ----------

    ..Oh yes and for goodness sake - DISABLE ROOT LOGINS!

    only login as a user.
     

Share This Page