SFTP não muda para modo de senha

SFTP não muda para modo de senha

Dois servidores, configurações e sshchaves sincronizadas. Ao conectar-se ao destino, o primeiro servidor mudou para o modo de senha:

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:

Enquanto o segundo servidor entra em loop infinito:

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
....

Alguma idéia do porquê?

Responder1

Parece que o problema estava no binário do cliente ssh:

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

Depois de copiar o binário ssh antigo, consigo me conectar ao servidor de destino.

Responder2

Eu tenho uma situação um pouco diferente. Eu tenho um script que baixa arquivos de um servidor remoto por sftp com autenticação por senha (com ajuda do expect). Quando atualizei o sistema operacional (Solaris10 x86), o sftp parou repentinamente de perguntar a senha:

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

Quando adicionei -o BatchMode=noà linha de comando, o prompt de senha apareceu:

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

informação relacionada