If you have a reason to log in to your macOS machine, from a remote machine on your network, why not enable the SSH daemon.
Your macOS-powered laptop or desktop includes the Secure Shell (SSH) client, which allows you to log in to remote servers and desktops that listen for incoming SSH connections. But did you know that you can easily add the SSH daemon to macOS, such that you can also log in to your macOS-powered device from any machine on the same network?
It's not only possible, it's really quite easy. Let me show you how.
SEE: Mastermind con man behind Catch Me If You Can talks cybersecurity (TechRepublic download)
The first thing to do is to enable remote login. Open System Preferences and click Sharing. From within the Sharing window, make sure Remote Login is enabled. You might also want to control who can log in, by selecting Only These Users and then adding the users in question.
I highly recommend against allowing all users to log in with SSH, as that could lead to a security breach. Once you've taken care of that, close out the System Preferences window and then open a terminal window on your Mac. You now need to find out the IP address of your macOS machine.
To do that issue the command:
ifconfig | less
You should also copy your SSH public key from the remote machine to the Mac with the command:
Where USER is the Mac username and IP is the IP address of the Mac.
With that taken care of, you can log in to your Mac, via SSH key authentication, so you don't have to worry that your user password can be sniffed out.
Finally, to log in to the Mac from a remote machine with SSH, issue the command:
Again, USER is the username on your Mac and IP is the IP address of your Mac.
And that's all there is to enabling SSH login to your macOS machine.
- How to become a cybersecurity pro: A cheat sheet (TechRepublic)
- macOS Mojave: A guide for IT leaders (TechRepublic Premium)
- How to use per-host SSH configuration (TechRepublic)
- How to copy a file from one server to another from a third with SSH (TechRepublic)
- How to allow SSH connections from LAN and WAN on different ports (TechRepublic)
- How to use multiplexing to speed up the SSH login process (TechRepublic)
- OpenSSH gets protection against attacks like Spectre, Meltdown, Rowhammer, and Rambleed (ZDNet)
- The best password managers of 2019 (CNET)
- Cybersecurity and cyberwar: More must-read coverage (TechRepublic on Flipboard)