Remote Login With SSH
Connecting with SSH is really easy. It’s what you do once you get connected that can be tricky. When you connect to another machine with SSH it’s just like you’re sitting at that machine running a Terminal session.That gives you a lot of power, and raises the potential for disaster. If you haven’t worked through Murphy’s other Terminal posts you might want to check them out before getting started.
We’re going to show you how to enable an account on your Mac for SSH access. Once that’s done you can access that Mac from other computers running just about any OS.
A great thing about SSH: It works well over slow connections. It’s not like a VNC session where you’re left wondering if the screen has updated or you’re scrolling around a 23″ display on a 15″ screen.
More importantly, SSH is secure. In fact, that’s what it’s called, Secure Shell. Your communications are conducted through an encrypted session and your passwords are always protected.
Once you have SSH up and running we’ll show you some other tricks, starting tomorrow. We’ll cover how to initiate an SSH session without using a password. This comes in handy if you have a frequent need for SSH or you have scripts that rely on its functionality.
You can connect from a PC too. Download and run the Putty exe. You’ll be able to access a Mac enabled for Remote Login.
What about connecting to your home Mac from Starbucks? You can do it, but if your home network is behind something like a Linksys or Netgear router you’ll need to forward port 22 to the machine running the SSH server. If you’re comfortable using the Terminal you’re more than capable of setting this up! For more details on port forwarding see Murphy’s post covering VNC.
If you’re not comfortable using the Terminal or you’re brand new to it - make sure you check out Murphy’s warning about the damage you can do.
When you’re up to speed on Terminal watch the screencast to get started with SSH.
Watch Now | Permalink
10. November 2007 at 12:02 pm :
Thanks very much, I have been trying to get this to work for ages. Nobody else seems to mention Port forwarding, this really helped me.
11. December 2008 at 5:28 am :
SSH works great for me, thanks. But, if I have the option, why not go all the way with Apple Remote Desktop (ARD)? That’s full Mac access, not just the shell.