1

I am trying to perform a password-less access from a Linux system to a MacOS system using SSH private / public keys

I am generating the keys on the Linux system using

ssh-keygen -t rsa -b 4096

and then copy the public key to my MacOS system using

ssh-copy-id -i id_rsa <myuserid>@<apple-system>

Then I call

ssh -v <myuserid>@<apple-system>

and I get different results when using Big Sur (Version 11.1) and Catalina (Version 10.15.7)!

On Catalina, everything works fine and I get access without a password prompt:

debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/pi/.ssh/id_rsa RSA SHA256:MQmWsfb2P9X/LLeKfm2hG1QpnM2Fi9EaoWAnTKSSSck
debug1: Server accepts key: /home/pi/.ssh/id_rsa RSA SHA256:MQmWsfb2P9X/LLeKfm2hG1QpnM2Fi9EaoWAnTKSSSck
debug1: Authentication succeeded (publickey).

On Big Sur the same id_rsa failed:

debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering public key: /home/pi/.ssh/id_rsa RSA SHA256:MQmWsfb2P9X/LLeKfm2hG1QpnM2Fi9EaoWAnTKSSSck
debug1: Authentications that can continue: publickey,password,keyboard-interactive

I checked the file permissions on both system and they are identical und also the configuration file /etc/ssh/sshd_config is the same on both systems.

Is there anything else in Big Sur, which has to be changed to allow password-less access from a remote system?

Any help is appreciated!

1
  • I have this problem too, but only with one macOS user, which is a non-administrator. With the administrator user it works fine. Also, that other user's home is on a different partition, not the usual /Users/xyz. Is either of that true with your situation as well?
    – digory doo
    Commented Oct 11, 2021 at 18:08

1 Answer 1

2

I know this is a long shot but still, here goes...

I used vi to add my keys to the authorized_keys file. Visually, the keys appeared to copy properly but in actuality, CRs were added along the right-most edge of the text at the terminal edge. This had the effect of turning one long stream of characters into multiple lines - however, this was not visually apparent via the terminal.

Once I re-added the keys and confirmed each key was one long string, publickey auth worked fine with zero mods required on the Big Sur server side.

Again, not sure this is your issue but since we had the exact same symptoms, server endpoint, and debug output, I felt it was worth a mention.

Good luck...

1
  • Thank you! This was precisely the problem that I had.
    – Zendel
    Commented Jun 16, 2023 at 17:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .