9
1
I recently bought a Macbook Air with Lion. I would like to ssh into my Mac at work. How do I set this up?
I have a private and public key, so I will likely use that option to allow access into my mac.
9
1
I recently bought a Macbook Air with Lion. I would like to ssh into my Mac at work. How do I set this up?
I have a private and public key, so I will likely use that option to allow access into my mac.
10
Apple -> System Preferences -> Sharing -> Remote Login.
It shows the IP of the local network, how can I ssh from the outside? – ilyo – 2015-01-08T13:54:53.397
You can't, @ilyo. Private addresses are only locally accessible. – Scott C Wilson – 2015-01-09T14:59:04.167
1I know I can't use that address outside, I'm asking how can I ssh to the mac from the outside. – ilyo – 2015-01-09T15:13:30.943
4
If you want to be able to SSH from work to home, you'll need to do the following:
Get the external IP address of your home network. You can obtain this by going to this website. If you ISP changes your IP frequently, you'll have to use something like Dyn DNS.
Open port 22 on your firewall/router and point it to the local IP address of the Mac you want to connect to. Instructions for this step vary on your firewall/router model. You may want to set up a DHCP reservation for this Mac so the internal IP address doesn't change.
On the Mac your want to connect to, open System Preferences → Sharing and enable Remote Login.
You should now be able to run the command ssh user@ip.of.your.mac, replacing "user" with the home computer's username and the "ip.of.your.mac" with the home IP address.
2
Simply activate the option in Preferences : "Remote login".
Access your mac :
ssh username@ip.of.your.mac
2What did you try so far? – Daniel Beck – 2012-02-27T17:41:36.043
This should give you the guidance you need: http://www.stocksy.co.uk/articles/Mac/ssh_on_mac_os_x/
– xXPhenom22Xx – 2012-02-27T17:46:10.773Thanks, I have tried altering Apple -> System Preferences -> Sharing -> Remote Login and then sshing into my mac air with
ssh davidfaux@dhcp-12-259-119-81.yale.eduas the instructions told me. However, this method fails since the terminal notes that the host dhcp-12-259-119-81.yale.edu is not recognized. – David Faux – 2012-02-27T18:19:39.750By the way, this IP address is fake, so I didn't reveal anything :) – David Faux – 2012-02-27T18:24:24.657
1You seem to be behind a firewall that's blocking SSH access from outside. Could that be? From where are you trying to SSH in, actually? You can also try to find out your real computer's IP (not the
dhcp-..hostname) and ssh to that. – slhck – 2012-02-27T18:47:57.527