key_read: type mismatch: erro de codificação

3

Vendo um erro muito estranho no recém-instalado CentOS7, eu não criei nem toquei em nenhuma chave ssh. O diretório ~/.ssh/ também está vazio.

[john@server1 ~]$ ssh server1
key_read: type mismatch: encoding error
key_read: type mismatch: encoding error
john@server1's password:

Se eu tentar ssh localhost , não estou recebendo esse erro. qual será o problema?

Atualização:

[john@server1 ~]$ ssh -vvv server1
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 49: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to server1 [10.1.1.10] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/john/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/john/.ssh/id_rsa type 1
debug1: identity file /home/john/.ssh/id_rsa-cert type -1
debug1: identity file /home/john/.ssh/id_dsa type -1
debug1: identity file /home/john/.ssh/id_dsa-cert type -1
debug1: identity file /home/john/.ssh/id_ecdsa type -1
debug1: identity file /home/john/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4
debug1: match: OpenSSH_6.4 pat OpenSSH*
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "server1" from file "/home/john/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/john/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "server1" from file "/etc/ssh/ssh_known_hosts"
key_read: type mismatch: encoding error
debug3: load_hostkeys: loaded 0 keys
...
... omitted some output
...
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
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 [email protected]
debug1: kex: server->client aes128-ctr [email protected] none
debug2: mac_setup: found [email protected]
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 45:9e:70:1d:89:49:d9:dd:ed:df:4b:b0:56:6e:11:31
debug3: load_hostkeys: loading entries for host "server1" from file "/home/john/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/john/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "server1" from file "/etc/ssh/ssh_known_hosts"
key_read: type mismatch: encoding error
debug3: load_hostkeys: loaded 0 keys
debug3: load_hostkeys: loading entries for host "10.1.1.10" from file "/home/john/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /home/john/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "10.1.1.10" from file "/etc/ssh/ssh_known_hosts"
key_read: type mismatch: encoding error
debug3: load_hostkeys: loaded 0 keys
debug1: Host 'server1' is known and matches the ECDSA host key.
debug1: Found key in /home/john/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct

Como por pedido aqui está a saída do arquivo.

$cat /etc/ssh/ssh_known_hosts
server1,server1,server1.example.com,10.1.1.10 ssh-dss AAAAB3NzaC1yc2EAAAADAQABAAABAQCjEZfdesyp4xtJslnXEvG0arhPAddsMFUmO/lbUoeT0p31QAnbfs3LvVc4EP/ziipJUiFZDaKeT3KB+4zmioIwR2pO67c9DDY4zTasVoZv1kL7EiHKYxNIjIMXhYMRm+MQBTiBJWW5NB9SRff/TQSBAnIcXqMZZYco1YO7b95XZR5fkO3LLE8Mr5LvuXwMNlzEu/+9vw69rxWbL+JnRJT2Ydv61h23bSL3reZ9ZvpEMVgF+DkgqxdBp9ao2GfTwLVx96E2/EnmWY2a/2KUlB9TwKGT7GI5VUcep1ia4esHid9wxXhjN/Iuw3k/VFzQSdTvIzg72DqkkPaBErxGJ83V
    
por Satish 01.02.2016 / 18:19

2 respostas

2

Você tem algum registro errado em /etc/ssh/ssh_known_hosts , como o log propõe. Como você configurou essa? É uma alternativa de todo o sistema para ~/.ssh/known_hosts e deve ser usada apenas em situações razoáveis (distribuição, rede local, certificados).

Verifique o que está nesse arquivo, verifique algumas inconsistências e possivelmente se houver seu server1 ou ip 10.1.1.10 .

    
por 01.02.2016 / 19:36
0

Estou com este problema depois de uma atualização massiva envolvendo também libssl , resolvi reiniciar o host:

# reboot
    
por 10.05.2016 / 14:24