Estou tentando usar somente minha chave ed25519
para fazer login no meu ssh
server. O arquivo /etc/ssh/sshd-cofig
do meu servidor tem estas configurações:
HostKey /etc/ssh/ssh_host_ed25519_key
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM yes
Também no meu host e outro cliente, aqui está meu arquivo ~/.ssh/config
:
VisualHostKey=yes
Host localhost
Hostname localhost
User test
IdentityFile ~/.ssh/test_ed25519
IdentitiesOnly yes
No servidor, eu testei usando
$ ssh -vT localhost
:
OpenSSH_7.6p1 Ubuntu-3, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /home/test/.ssh/config
debug1: /home/test/.ssh/config line 3: Applying options for localhost
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /home/test/.ssh/test_ed25519 type 3
debug1: key_load_public: No such file or directory
debug1: identity file /home/test/.ssh/test_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-3
debug1: match: OpenSSH_7.6p1 Ubuntu-3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to localhost:22 as 'test'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-ed25519 SHA256:il9aNUlCWvupEkL7xZUfc/bzSDX3AOr+0jd0z1DLh90
debug1: Host 'localhost' is known and matches the ED25519 host key.
debug1: Found key in /home/test/.ssh/known_hosts:1
Host key fingerprint is SHA256:il9aNUlCWvupEkL7xZUfc/bzSDX3AOr+0jd0z1DLh90
+--[ED25519 256]--+
| o . |
| + . o . |
| . . o = o +.o|
| . . . * + = +=|
| o . S B . o==|
| + + + . .++E|
| . + + .. ..++|
| . = ... o o|
| o ... . |
+----[SHA256]-----+
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_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: ED25519 SHA256:IDOk5Rq4u0zBrupnDSgSzF5k5LpjcCTewcsm2qAC40w /home/test/.ssh/test_ed25519
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
test@localhost: Permission denied (publickey).