Eu tentei fazer conexão ssh do meu PC para um servidor. Minha chave pública foi armazenada no servidor. Durante o processo de conexão, a senha foi solicitada, então inseri a frase secreta que usei ao criar minha chave pública. Então, eu deveria poder acessar o servidor. No entanto, meu acesso foi negado e não havia qualquer razão para isso acontecer. Eu tentei imprimir as mensagens de log durante o ssh, que são mostradas abaixo.
Então, minha pergunta é: você poderia apontar porque esse erro aconteceu?
OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /Users/me/.ssh/config
debug1: /Users/me/.ssh/config line 1: Applying options for mls
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to hostname port XX.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /Users/me/.ssh/me.ppk type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/me/.ssh/me.ppk-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: Remote protocol version 1.99, remote software version 3.1.0 SSH Secure Shell (non-commercial)
debug1: no match: 3.1.0 SSH Secure Shell (non-commercial)
debug1: Authenticating to hostname:22 as 'me'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group1-sha1
debug1: kex: host key algorithm: ssh-dss
debug1: kex: server->client cipher: 3des-cbc MAC: hmac-sha1 compression: none
debug1: kex: client->server cipher: 3des-cbc MAC: hmac-sha1 compression: none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: ssh-dss SHA256:ZJNANfkansaff....
debug1: Host 'host ip' is known and matches the DSA host key.
debug1: Found key in /Users/me/.ssh/known_hosts:2
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/me/.ssh/me.ppk
Enter passphrase for key '/Users/me/.ssh/me.ppk':
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
me@hostname: Permission denied (publickey).
Eu li em algum lugar, pode ser devido a permissão de arquivo / diretório. Então, eu configurei a permissão para /Users/me/.ssh para 700 e os arquivos dentro dele para 600. Mas ainda tenho o mesmo problema.
Eu realizei -vvv em para ssh. Aqui, eu anexei o trecho disso.
debug1: Server host key: ssh-dss SHA256:KxI27OKkpUaov7pdKGwaPtH...
debug3: hostkeys_foreach: reading file "/Users/me/.ssh/known_hosts"
debug3: record_hostkey: found key type DSA in file /Users/me/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from 131.112.16.206
debug1: Host '131.112.16.206' is known and matches the DSA host key.
debug1: Found key in /Users/me/.ssh/known_hosts:1
debug2: bits set: 527/1024
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 4294967296 blocks
debug2: key: /Users/me/.ssh/me.ppk (0x0), explicit
debug3: send packet: type 5
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 2
debug3: Received SSH2_MSG_IGNORE
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
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: me.ppk
Enter passphrase for key '/Users/me.ssh/me.ppk':
debug3: sign_and_send_pubkey: DSA SHA256:G0FdRIXLPYrvaqtfpw5...
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 2
debug3: Received SSH2_MSG_IGNORE
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).
Eu não estou realmente familiarizado com as mensagens de depuração, mas eu estou querendo saber, deve "chave de host do servidor: ssh-dss SHA256: KxI27OKkpUaov7pdKGwaP ..." e "sign_and_send_pubkey: DSA SHA256: G0FdRIXL ...." ser o mesmo?
Embora minha chave privada tenha extensão .ppk, eu já a exportei como chave openSSH por meio do gerador Putty Key.
Obrigado.