SSH zu localhost auf OS X Mountain Lion schlägt mit ungültigem Passwort fehl (nach Neuinstallation und Migration)

Nach der Neuinstallation von OS X und der Migration meines Kontos über Time Machine kann ich keine SSH-Verbindung zu localhost herstellen. Es fragt mich nach einem Passwort, nimmt aber nicht das Passwort meines tatsächlichen Benutzers.

Ich habe auch versucht, einen ~/.ssh/authorized_keys-Eintrag einzurichten, aber er fordert immer noch zur Eingabe des Passworts auf. Ich habe sogar versucht, meinen SSH-Schlüssel neu zu erstellen, was nicht geholfen hat.

Hier ist meine ausführliche ssh-Ausgabe:

> ssh -vvv localhost
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /Users/dolan/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: identity file /Users/dolan/.ssh/id_rsa type -1
debug1: identity file /Users/dolan/.ssh/id_rsa-cert type -1
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/dolan/.ssh/id_dsa" as a RSA1 public key
debug1: identity file /Users/dolan/.ssh/id_dsa type 2
debug1: identity file /Users/dolan/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug2: fd 5 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "localhost" from file "/Users/dolan/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 129/256
debug2: bits set: 463/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA e9:e2:c4:ef:08:08:ac:15:c5:b9:fd:c3:c3:b4:74:04
debug3: load_hostkeys: loading entries for host "localhost" from file "/Users/dolan/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is e9:e2:c4:ef:08:08:ac:15:c5:b9:fd:c3:c3:b4:74:04.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
debug2: bits set: 484/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /Users/dolan/.ssh/id_rsa (0x0)
debug2: key: /Users/dolan/.ssh/id_dsa (0x7f81ebc1d3a0)
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: start over, passed a different list publickey,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
debug1: Trying private key: /Users/dolan/.ssh/id_rsa
debug3: no such identity: /Users/dolan/.ssh/id_rsa
debug1: Offering DSA public key: /Users/dolan/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,keyboard-interactive
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
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
debug3: packet_send2: adding 32 (len 27 padlen 5 extra_pad 64)
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:

Irgendwelche Ideen zu dem Problem oder wie man weiter debuggen kann?

Bearbeiten: Ich habe dolan@localhost beim SSH versucht, und das gleiche Ergebnis. Außerdem sollte /etc/sshd_config seit der Neuinstallation der Standard sein. Ich habe versucht, UsePAM zu aktivieren (keine Logik, warum ich das versucht habe, außer dass es in einem Forum erwähnt wurde), und es hat nicht geholfen. Irgendwelche anderen SSH-Einstellungen, die geändert werden müssen?

Hmm - Sie sollten in der Lage sein, Ihr Passwort einzugeben und hineinzukommen - enthält /private/var/log/system.log irgendwelche merkwürdigen sshd-Einträge? Möglicherweise müssen Sie es im ausführlichen Modus ausführen, da das Debuggen von ssh gut ist, wenn Sie den Haupt-Daemon nicht sehen können, aber nichts in dieser Ausgabe fehlerhaft zu sein scheint (insbesondere, da Sie eine Passwort-Promoting erhalten).
In system.log erhalte ich „error: PAM: permission denied for dolan from localhost via ::1“. Gibt es eine SSH-Einstellung unter dem Benutzerkonto, das ich aktivieren muss?
Ich habe es gerade herausgefunden, nachdem ich diesen Fehler gegoogelt hatte. Der "Zugriff zulassen für" unter Remote-Login hat einen "Unbekannten Benutzer", wo es vorher mein Konto war. Ich glaube, die UID meines Benutzers hat sich mit der Neuinstallation geändert

Antworten (1)

Unter Systemeinstellungen -> Freigabe -> Remote-Anmeldung zeigt mein "Zugriff zulassen für" "Unbekannter Benutzer" unter "Nur für diese Benutzer". Dies liegt wahrscheinlich daran, dass sich die UID meines Benutzers nach der Neuinstallation geändert hat. Die Lösung besteht natürlich darin, sicherzustellen, dass sich mein Benutzerkonto in der Liste der zulässigen Benutzer befindet, oder für alle Benutzer zu aktivieren.

Schöner Fang! Das hilft sicherlich jemandem weiter...