Unable to SSH into a pi from mac with M1 chip

I can not log into a raspberry pi that I have set up using the terminal on the mac and ssh protocols. I am am using the correct password as I can log onto it from another Windows based computer. My firewall settings are currently set to off and I have allowed SSH on my system preferences. This is the response I get when trying to log in.


(base) ~ % ssh user@piFive.local

user@pifive.local's password: 

Permission denied, please try again.

user@pifive.local's password: 


I have attempted to completely reflash the SD card which did not fix the problem, I used a secondary SD card also did not fix the problem. The only way I have been able to access the pi is from another computer although I have told the mac to trust this device.

MacBook Pro 16″, macOS 14.2

Posted on Jan 20, 2024 2:08 PM

Reply
Question marked as Best reply

Posted on Jan 20, 2024 3:09 PM

Try adding the following to your Mac's $HOME/.ssh/config file

 Host *
    ServerAliveInterval 300
    ServerAliveCountMax 2
    TCPKeepAlive no
    HostkeyAlgorithms        +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa


The most recent OpenSSH release has depreciated RSA keys, which it is very likely the Pi is using. The above config file entry will allow your Mac's ssh client to accept the RSA keys for authentication.

Similar questions

2 replies
Question marked as Best reply

Jan 20, 2024 3:09 PM in response to Doctor_Roboto

Try adding the following to your Mac's $HOME/.ssh/config file

 Host *
    ServerAliveInterval 300
    ServerAliveCountMax 2
    TCPKeepAlive no
    HostkeyAlgorithms        +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa


The most recent OpenSSH release has depreciated RSA keys, which it is very likely the Pi is using. The above config file entry will allow your Mac's ssh client to accept the RSA keys for authentication.

Unable to SSH into a pi from mac with M1 chip

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.