PbCopy111 谢谢指导。我的理解是你指 remote 端 mac 这样改是吧,为防止出错,我两台 mac 都改了。已经 PubkeyAuthentication yes 。 没有添加 RSAAuthentication yes ,因为用的 ed25519 。然后 remote login off, remote login on (相当于重启了 hhd),目前还是没效果。tim@timmac ~ % ssh -Tvv hilary@hilarymac.localOpenSSH_8.6p1, LibreSSL 3.3.6debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no filesdebug1: /etc/ssh/ssh_config line 54: Applying options for *debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disablingdebug1: Connecting to hilarymac.local port 22.debug1: Connection established.debug1: identity file /Users/tim/.ssh/id_rsa type -1debug1: identity file /Users/tim/.ssh/id_rsa-cert type -1debug1: identity file /Users/tim/.ssh/id_dsa type -1debug1: identity file /Users/tim/.ssh/id_dsa-cert type -1debug1: identity file /Users/tim/.ssh/id_ecdsa type -1debug1: identity file /Users/tim/.ssh/id_ecdsa-cert type -1debug1: identity file /Users/tim/.ssh/id_ecdsa_sk type -1debug1: identity file /Users/tim/.ssh/id_ecdsa_sk-cert type -1debug1: identity file /Users/tim/.ssh/id_ed25519 type 3debug1: identity file /Users/tim/.ssh/id_ed25519-cert type -1debug1: identity file /Users/tim/.ssh/id_ed25519_sk type -1debug1: identity file /Users/tim/.ssh/id_ed25519_sk-cert type -1debug1: identity file /Users/tim/.ssh/id_xmss type -1debug1: identity file /Users/tim/.ssh/id_xmss-cert type -1debug1: Local version string SSH-2.0-OpenSSH_8.6debug1: Remote protocol version 2.0, remote software version OpenSSH_8.6debug1: compat_banner: match: OpenSSH_8.6 pat OpenSSH* compat 0x04000000debug1: Authenticating to hilarymac.local:22 as 'hilary'debug1: load_hostkeys: fopen /Users/tim/.ssh/known_hosts2: No such file or directorydebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directorydebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directorydebug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug2: local client KEXINIT proposaldebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,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-cdebug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsadebug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.comdebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.comdebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1debug2: compression ctos: none,zlib@openssh.com,zlibdebug2: compression stoc: none,zlib@openssh.com,zlibdebug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposaldebug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,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-sha256debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.comdebug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.comdebug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1debug2: compression ctos: none,zlib@openssh.comdebug2: compression stoc: none,zlib@openssh.comdebug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: curve25519-sha256debug1: kex: host key algorithm: ssh-ed25519debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: SSH2_MSG_KEX_ECDH_REPLY receiveddebug1: Server host key: ssh-ed25519 SHA256:xECOJFQQ3Rwk4Xg9QeD3yGZTE7ud71XhuBHGG/X0KPQdebug1: load_hostkeys: fopen /Users/tim/.ssh/known_hosts2: No such file or directorydebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directorydebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directorydebug1: Host 'hilarymac.local' is known and matches the ED25519 host key.debug1: Found key in /Users/tim/.ssh/known_hosts:12debug2: set_newkeys: mode 1debug1: rekey out after 134217728 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug2: set_newkeys: mode 0debug1: rekey in after 134217728 blocksdebug1: Will attempt key: /Users/tim/.ssh/id_rsa debug1: Will attempt key: /Users/tim/.ssh/id_dsa debug1: Will attempt key: /Users/tim/.ssh/id_ecdsa debug1: Will attempt key: /Users/tim/.ssh/id_ecdsa_sk debug1: Will attempt key: /Users/tim/.ssh/id_ed25519 ED25519 SHA256:wJbU+P+mASkQNm/g1cd+a8vRc/81sULbFgqzk7buPj8debug1: Will attempt key: /Users/tim/.ssh/id_ed25519_sk debug1: Will attempt key: /Users/tim/.ssh/id_xmss debug2: pubkey_prepare: donedebug1: SSH2_MSG_EXT_INFO receiveddebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com>debug2: service_accept: ssh-userauthdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Next authentication method: publickeydebug1: Trying private key: /Users/tim/.ssh/id_rsadebug1: Trying private key: /Users/tim/.ssh/id_dsadebug1: Trying private key: /Users/tim/.ssh/id_ecdsadebug1: Trying private key: /Users/tim/.ssh/id_ecdsa_skdebug1: Offering public key: /Users/tim/.ssh/id_ed25519 ED25519 SHA256:wJbU+P+mASkQNm/g1cd+a8vRc/81sULbFgqzk7buPj8debug2: we sent a publickey packet, wait for replydebug1: Authentications that can continue: publickey,password,keyboard-interactivedebug1: Trying private key: /Users/tim/.ssh/id_ed25519_skdebug1: Trying private key: /Users/tim/.ssh/id_xmssdebug2: we did not send a packet, disable methoddebug1: Next authentication method: keyboard-interactivedebug2: userauth_kbdintdebug2: we sent a keyboard-interactive packet, wait for replydebug2: input_userauth_info_req: enteringdebug2: input_userauth_info_req: num_prompts 1(hilary@hilarymac.local) Password: