SFTP wechselt nicht in den Kennwortmodus

SFTP wechselt nicht in den Kennwortmodus

Zwei Server, synchronisierte Konfigurationen und sshSchlüssel. Beim Verbinden mit dem Ziel wechselte der erste Server in den Passwortmodus:

debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug3: start over, passed a different list password,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: Offering public key: /root/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-dss blen 433
debug2: input_userauth_pk_ok: fp xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
debug3: sign_and_send_pubkey
debug1: read PEM private key done: type DSA
Authenticated with partial success.
debug1: Authentications that can continue: password,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
Password Authentication
debug2: input_userauth_info_req: num_prompts 1
Password:

Während der zweite Server in eine Endlosschleife gerät:

debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering DSA public key: /root/.ssh/id_dsa
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-dss blen 433
debug2: input_userauth_pk_ok: fp xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx [MD5]
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
Authenticated with partial success.
debug2: key: /root/.ssh/id_dsa ((nil)), explicit
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /root/.ssh/id_dsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug2: we sent a publickey packet, wait for reply
Authenticated with partial success.
debug2: key: /root/.ssh/id_dsa ((nil)), explicit
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /root/.ssh/id_dsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug2: we sent a publickey packet, wait for reply
Authenticated with partial success.
debug2: key: /root/.ssh/id_dsa ((nil)), explicit
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /root/.ssh/id_dsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug2: we sent a publickey packet, wait for reply
Authenticated with partial success.
debug2: key: /root/.ssh/id_dsa ((nil)), explicit
debug1: Authentications that can continue: password,publickey,keyboard-interactive
debug1: Trying private key: /root/.ssh/id_dsa
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug2: we sent a publickey packet, wait for reply
....

Irgendwelche Ideen, warum?

Antwort1

Das Problem schien bei der Binärdatei des SSH-Clients zu liegen:

OpenSSH_6.6.1p1, OpenSSL 0.9.8j-fips 07 Jan 2009

Nachdem ich die alte SSH-Binärdatei kopiert habe, kann ich eine Verbindung zum Zielserver herstellen.

Antwort2

Bei mir ist die Situation etwas anders. Ich habe ein Skript, das Dateien per SFTP mit Kennwortauthentifizierung (mithilfe von expect) vom Remote-Server herunterlädt. Als ich das Betriebssystem (Solaris10 x86) aktualisierte, hörte SFTP plötzlich auf, nach dem Kennwort zu fragen:

$ sftp -b batches/batch_file [email protected]
Permission denied (password).
Connection closed

Als ich -o BatchMode=noder Befehlszeile Folgendes hinzufügte, erschien die Kennwortabfrage:

$ sftp -o BatchMode=no -b batches/batch_file  [email protected]
[email protected]'s password:

verwandte Informationen