How to enable SSH login on macOS

If you have a reason to log in to your macOS machine from an external machine in your network, why not enable the SSH daemon.

How to enable SSH login on macOS
If you have a reason to log in to your macOS machine from an external machine in your network, why not enable the SSH daemon.

Your macOS-powered laptop or desktop contains the Secure Shell (SSH) client, which allows you to log in to external servers and desktops that listen for incoming SSH connections. But did you know that you can easily add the SSH daemon to macOS so that you can log in to your macOS device from any machine on the same network?

It’s not only possible, it’s really pretty simple. I’ll show you how.

SEE: Mastermind scammer behind Catch Me If You Can talks about cyber security (TechRepublic download)

The first thing to do is enable remote login. Open System Preferences and click Share. Make sure Remote Login is enabled from the Share window. You may also want to determine who can log in by selecting Only these users and then adding the relevant users.

I strongly advise against allowing all users to log in with SSH, as this could lead to a vulnerability. Once you’ve arranged that, close the System Preferences window and open a terminal window on your Mac. You must now find the IP address of your macOS machine.

To do that you give the command:

ifconfig | less

Also copy your public SSH key from the remote computer to the Mac with the command:

ssh copy id USER @ IP

Where USER is the Mac username and IP is the IP address of the Mac.

With that care you can log in to your Mac, via SSH key verification, so you don’t have to worry about your user password being sniffed away.

Finally, to log in to the Mac from an external machine with SSH, give the command:

ssh USER @ IP

Again, USER is the username on your Mac and IP is the IP address of your Mac.

And that is all that makes SSH registration possible on your macOS machine.

Cyber ​​Security Insider Newsletter

Strengthen the IT security of your organization by staying up to date with the latest news, solutions and best practices for cyber security.
Delivered on Tuesday and Thursday

Register today

Also see

Image: Apple

Hitting the Books: How one of our first ‘creative’ weapons assisted stop the Nazis

Houghton Mifflin Harcourt Excerpted from 12 Seconds of Silence: How a Team of Inventors, Tinkerers, and Spies Took Down a Nazi Superweapon by Jamie Holmes. Used by permission of Houghton Mifflin Harcourt.From the deck of the USS Lexington, on May 8, 1942, a barrage of deafening shots flung dozens of five-inch rounds into the clear sky. They…

FBI, Homeland Security detail how Iranian hackers took United States voter information

They made at least some attempt to cover their tracks. Many of the linked IP addresses come from NordVPN’s service as well as other VPN providers.The attackers obtained voter registration info for “at least one” state, officials said, although they unsurprisingly weren’t specific about the nature of that breach or the volume of data taken.CISA…

How innovation and policy can alleviate climate impacts in an age of colliding crises

Today, the federal government spends less than $9 billion annually on energy innovation, which is less than a quarter of what it invests in health innovation and less than a tenth of what it invests in defense innovation. As we sit at a crossroads of an unprecedented confluence of challenges — from a public health…

Leave a Reply