MacOS Catalina: Password-less SSH Stopped Working
If you have a 2013 MacBook Pro that is maxed out and running MacOS 10.15.7 (19H2026), you may have configured it to accept password-less SSH connections. However, you may have noticed that recently, these connections have stopped working.
Background
SSH (Secure Shell) is a protocol used for secure remote login from one computer to another. It is a secure alternative to Telnet and uses encryption to ensure that the data transmitted between the two computers is not intercepted by third parties.
Password-less SSH connections are a convenient way to automate tasks that require remote login. They allow you to log in to a remote server without having to enter a password every time. This is achieved by creating a pair of keys, one public and one private, and configuring the server to trust the public key.
The Problem
Recently, some users have reported that password-less SSH connections have stopped working on their MacOS Catalina systems. The problem seems to be related to a security update that was released by Apple.
Solution
The solution to this problem is to modify the SSH configuration to allow password-less authentication. This can be done by following these steps:
Generate a new pair of SSH keys using the
ssh-keygencommand.Copy the public key to the remote server using the
ssh-copy-idcommand.Modify the SSH configuration on the remote server to allow password-less authentication.
Step-by-Step Guide
Here is a step-by-step guide to modifying the SSH configuration to allow password-less authentication:
Generate a new pair of SSH keys using the following command:
ssh-keygen -t rsa -b 4096 -C "your\[email protected]"This will generate a new pair of SSH keys with a length of 4096 bits and an email address as a comment. You can replace "your\[email protected]" with your own email address.
Copy the public key to the remote server using the following command:
ssh-copy-id username@remote\_serverReplace "username" with your username on the remote server and "remote\_server" with the hostname or IP address of the remote server.
Modify the SSH configuration on the remote server to allow password-less authentication. This can be done by editing the
/etc/ssh/sshd\_configfile and changing the following line:ChallengeResponseAuthentication yesto
ChallengeResponseAuthentication noThis will disable the challenge-response authentication and allow password-less authentication.
Password-less SSH connections are a convenient way to automate tasks that require remote login. However, recent security updates by Apple may have caused password-less SSH connections to stop working on MacOS Catalina systems. To fix this problem, you need to modify the SSH configuration to allow password-less authentication.
References
Note: This article is for informational purposes only. The author is not responsible for any damage or loss caused by following the instructions in this article.
End of article.