2

I have a 2013 MacBook Pro that's been maxed out at MacOS 10.15.7 (19H2026) for quite a while now. It's configured to accept password-less SSH connections. A couple of days ago, out of the blue, when I try to SSH in, it began prompting for a password. I am connecting to the 2013 MacBook Pro with an MacBook Air (M1, 2020) running macOS Sonoma 14.2.1.

Things I've verified:

  • Permissions on ~/.ssh (700), ~/.ssh/id_rsa.pub (644), ~/.ssh/id_rsa and ~/.ssh/authorized_keys (600)
  • The only uncommented lines in /etc/ssh/sshd_config are:
    AuthorizedKeysFile   .ssh/authorized_keys
    UsePAM yes
    AcceptEnv LANG LC_*
    Subsystem    sftp    /usr/libexec/sftp-server
    XAuthLocation /opt/X11/bin/xauth
    
  • Remote Login is enabled. The GUI has stopped working so I have to use this command-line solution, but I can still log in by providing the password.
  • I've rebooted the Catalina box.
  • My client, a recent MacBook Air, can still SSH into an up-to-date Linux running in a VM on the Catalina box.
  • "Nothing's changed! I swear!"

Assuming those sshd_config parameters are correct (the file's modification date is June 2023, and I don't know if that was me or a system update), what are some other things to try?


Update:

Here is the output from ssh -vvv <macbook-pro>:

Air:~$ ssh -vvv retsina.local
OpenSSH_9.6p1, OpenSSL 3.2.1 30 Jan 2024
debug1: Reading configuration data /opt/homebrew/etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/chap/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/chap/.ssh/known_hosts2'
debug2: resolving "retsina.local" port 22
debug3: resolve_host: lookup retsina.local:22
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to retsina.local [fe80::1b:28be:15d5:c41b%en0] port 22.
debug3: set_sock_tos: set socket 6 IPV6_TCLASS 0x48
debug1: Connection established.
debug1: identity file /Users/chap/.ssh/id_rsa type 0
debug1: identity file /Users/chap/.ssh/id_rsa-cert type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/chap/.ssh/id_ed25519 type 3
debug1: identity file /Users/chap/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/chap/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/chap/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/chap/.ssh/id_xmss type -1
debug1: identity file /Users/chap/.ssh/id_xmss-cert type -1
debug1: identity file /Users/chap/.ssh/id_dsa type -1
debug1: identity file /Users/chap/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.1
debug1: compat_banner: match: OpenSSH_8.1 pat OpenSSH* compat 0x04000000
debug2: fd 6 setting O_NONBLOCK
debug1: Authenticating to retsina.local:22 as 'chap'
debug3: record_hostkey: found key type ED25519 in file /Users/chap/.ssh/known_hosts:1
debug3: record_hostkey: found key type ECDSA in file /Users/chap/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 2 keys from retsina.local
debug1: load_hostkeys: fopen /Users/chap/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: have matching best-preference key type [email protected], using HostkeyAlgorithms verbatim
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: [email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c,[email protected]
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:LPhM+eeposmTyzQiRXnh92AUZr/9MIrMgiW3VjLHCQM
debug3: record_hostkey: found key type ED25519 in file /Users/chap/.ssh/known_hosts:1
debug3: record_hostkey: found key type ECDSA in file /Users/chap/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 2 keys from retsina.local
debug1: load_hostkeys: fopen /Users/chap/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'retsina.local' is known and matches the ED25519 host key.
debug1: Found key in /Users/chap/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: ssh_set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug3: kex_input_ext_info: extension server-sig-algs
debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug3: ssh_get_authentication_socket_path: path '/private/tmp/com.apple.launchd.Ud5MvVC3io/Listeners'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /Users/chap/.ssh/id_rsa RSA SHA256:sEwBJnORX9BWQ5itF6CoX36w7jcl6E0Lcnkunvh4ew8
debug1: Will attempt key: /Users/chap/.ssh/id_ecdsa
debug1: Will attempt key: /Users/chap/.ssh/id_ecdsa_sk
debug1: Will attempt key: /Users/chap/.ssh/id_ed25519 ED25519 SHA256:S+OFCXTuvaLKr8CA0kcHonO7TfhP9L03jfohS2uIfZw
debug1: Will attempt key: /Users/chap/.ssh/id_ed25519_sk
debug1: Will attempt key: /Users/chap/.ssh/id_xmss
debug1: Will attempt key: /Users/chap/.ssh/id_dsa
debug2: pubkey_prepare: done
debug1: Offering public key: /Users/chap/.ssh/id_rsa RSA SHA256:sEwBJnORX9BWQ5itF6CoX36w7jcl6E0Lcnkunvh4ew8
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/chap/.ssh/id_ecdsa
debug3: no such identity: /Users/chap/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /Users/chap/.ssh/id_ecdsa_sk
debug3: no such identity: /Users/chap/.ssh/id_ecdsa_sk: No such file or directory
debug1: Offering public key: /Users/chap/.ssh/id_ed25519 ED25519 SHA256:S+OFCXTuvaLKr8CA0kcHonO7TfhP9L03jfohS2uIfZw
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/chap/.ssh/id_ed25519_sk
debug3: no such identity: /Users/chap/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /Users/chap/.ssh/id_xmss
debug3: no such identity: /Users/chap/.ssh/id_xmss: No such file or directory
debug1: Trying private key: /Users/chap/.ssh/id_dsa
debug3: no such identity: /Users/chap/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req: entering
debug2: input_userauth_info_req: num_prompts 1
([email protected]) Password:

Update 2:

After adding ~/.ssh/config to MacBook Air, here is the output of SSH again:

Air:~/.ssh$ ssh -vvv retsina.local
OpenSSH_9.6p1, OpenSSL 3.2.1 30 Jan 2024
debug1: Reading configuration data /Users/chap/.ssh/config
debug1: /Users/chap/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /opt/homebrew/etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/chap/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/chap/.ssh/known_hosts2'
debug2: resolving "retsina.local" port 22
debug3: resolve_host: lookup retsina.local:22
debug3: channel_clear_timeouts: clearing
debug3: ssh_connect_direct: entering
debug1: Connecting to retsina.local [fe80::1b:28be:15d5:c41b%en0] port 22.
debug3: set_sock_tos: set socket 6 IPV6_TCLASS 0x48
debug1: Connection established.
debug1: identity file /Users/chap/.ssh/id_rsa type 0
debug1: identity file /Users/chap/.ssh/id_rsa-cert type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/chap/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/chap/.ssh/id_ed25519 type 3
debug1: identity file /Users/chap/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/chap/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/chap/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/chap/.ssh/id_xmss type -1
debug1: identity file /Users/chap/.ssh/id_xmss-cert type -1
debug1: identity file /Users/chap/.ssh/id_dsa type -1
debug1: identity file /Users/chap/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.1
debug1: compat_banner: match: OpenSSH_8.1 pat OpenSSH* compat 0x04000000
debug2: fd 6 setting O_NONBLOCK
debug1: Authenticating to retsina.local:22 as 'chap'
debug3: record_hostkey: found key type ED25519 in file /Users/chap/.ssh/known_hosts:1
debug3: record_hostkey: found key type ECDSA in file /Users/chap/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 2 keys from retsina.local
debug1: load_hostkeys: fopen /Users/chap/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: have matching best-preference key type [email protected], using HostkeyAlgorithms verbatim
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: [email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c,[email protected]
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:LPhM+eeposmTyzQiRXnh92AUZr/9MIrMgiW3VjLHCQM
debug3: record_hostkey: found key type ED25519 in file /Users/chap/.ssh/known_hosts:1
debug3: record_hostkey: found key type ECDSA in file /Users/chap/.ssh/known_hosts:2
debug3: load_hostkeys_file: loaded 2 keys from retsina.local
debug1: load_hostkeys: fopen /Users/chap/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /opt/homebrew/etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host 'retsina.local' is known and matches the ED25519 host key.
debug1: Found key in /Users/chap/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: ssh_set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug3: kex_input_ext_info: extension server-sig-algs
debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug3: ssh_get_authentication_socket_path: path '/private/tmp/com.apple.launchd.Ud5MvVC3io/Listeners'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /Users/chap/.ssh/id_rsa RSA SHA256:sEwBJnORX9BWQ5itF6CoX36w7jcl6E0Lcnkunvh4ew8
debug1: Will attempt key: /Users/chap/.ssh/id_ecdsa
debug1: Will attempt key: /Users/chap/.ssh/id_ecdsa_sk
debug1: Will attempt key: /Users/chap/.ssh/id_ed25519 ED25519 SHA256:S+OFCXTuvaLKr8CA0kcHonO7TfhP9L03jfohS2uIfZw
debug1: Will attempt key: /Users/chap/.ssh/id_ed25519_sk
debug1: Will attempt key: /Users/chap/.ssh/id_xmss
debug1: Will attempt key: /Users/chap/.ssh/id_dsa
debug2: pubkey_prepare: done
debug1: Offering public key: /Users/chap/.ssh/id_rsa RSA SHA256:sEwBJnORX9BWQ5itF6CoX36w7jcl6E0Lcnkunvh4ew8
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/chap/.ssh/id_ecdsa
debug3: no such identity: /Users/chap/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /Users/chap/.ssh/id_ecdsa_sk
debug3: no such identity: /Users/chap/.ssh/id_ecdsa_sk: No such file or directory
debug1: Offering public key: /Users/chap/.ssh/id_ed25519 ED25519 SHA256:S+OFCXTuvaLKr8CA0kcHonO7TfhP9L03jfohS2uIfZw
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/chap/.ssh/id_ed25519_sk
debug3: no such identity: /Users/chap/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /Users/chap/.ssh/id_xmss
debug3: no such identity: /Users/chap/.ssh/id_xmss: No such file or directory
debug1: Trying private key: /Users/chap/.ssh/id_dsa
debug3: no such identity: /Users/chap/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req: entering
debug2: input_userauth_info_req: num_prompts 1
([email protected]) Password:
1

1 Answer 1

3

I noticed that the permissions for /Users/chap/ on the MacBook Pro (10.15.7) were 777. Changing them to 755 fixed everything.

I'm not certain when or how the permissions were changed, or what else could have changed so that these incorrect permissions were now causing public key SSH authentication to fail. The System Information Software Installation log lists nothing more recent than MacOS Catalina Security Update 2022-005, applied 8/27/2022. I log in to this machine every day, and the login failure began only several days ago.

Update: Something did change:

I have a special, dedicated user on the Catalina machine where I run Homebrew. However, it's not the user I was having trouble with. I figured that, just like in more recent versions of macOS, I could enable the presence of Homebrew by simply adding its installation directory to the $PATH variable in .bash_profile. On Sonoma, it's /opt/homebrew. On Catalina and earlier, it's /usr/local/bin.

For the user I was having trouble SSH’ing into, I had omitted appending /usr/local/bin from $PATH, intending to eliminate any Homebrew related installs from the mix.

I was wrong.

It turns out that the system — that is, macOS — prepends /usr/local/bin to $PATH automatically.

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin

Furthermore, when I recently ran brew upgrade, it upgraded openssl:

$ /usr/bin/openssl version
LibreSSL 2.8.3
$ /usr/local/bin/openssl version
OpenSSL 3.2.1 30 Jan 2024 (Library: OpenSSL 3.2.1 30 Jan 2024)

So all along, every SSH user on my Catalina has been accessing OpenSSL provided by Homebrew, and it was recently updated. I don't know precisely how this changed the way SSH worked, but it seems very likely that a recent Homebrew upgrade was somehow responsible for this problem.

Caveat Homebrewer!

0

You must log in to answer this question.

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