Bug 352709 - sftp: The host key for this server was not found, but another type of key exists
Summary: sftp: The host key for this server was not found, but another type of key exists
Status: RESOLVED WORKSFORME
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: sftp (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Andreas Schneider
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-14 19:35 UTC by Salvo "LtWorf" Tomaselli
Modified: 2015-10-14 07:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Salvo "LtWorf" Tomaselli 2015-09-14 19:35:32 UTC
When trying to connect to salvo@10.0.0.3 with sftp I get this error message:

The host key for this server was not found, but another type of key exists.
An attacker might change the default server key to confuse your client into thinking the key does not exist.
Please contact your system administrator.


However sftp from the terminal does not complain about the certificate. 

I say kio is wrong. But I don't know exactly what is going on.

Reproducible: Always
Comment 1 Andreas Schneider 2015-10-12 15:29:20 UTC
Which libssh version do you use?

What is the keytype in your known_hosts file?

What keytype is the server sending?
Comment 2 Salvo "LtWorf" Tomaselli 2015-10-12 17:26:29 UTC
(In reply to Andreas Schneider from comment #1)
> Which libssh version do you use?

dpkg -l | grep libssh
ii  libssh-4:amd64                                0.6.3-4.1                           amd64        tiny C SSH library (OpenSSL flavor)
ii  libssh-gcrypt-4:amd64                         0.6.3-4.1                           amd64        tiny C SSH library (gcrypt flavor)
ii  libssh2-1:amd64                               1.5.0-2+b1                          amd64        SSH2 client-side library


> What is the keytype in your known_hosts file?
I don't know, the hosts seem to be base64 encoded, but I only have those 2 kinds:

ecdsa-sha2-nistp256
ssh-rsa

> What keytype is the server sending?
I don't know
Comment 3 Andreas Schneider 2015-10-14 07:33:38 UTC
Please update to libssh 0.7.2. This should fix the issue.

If you are still running into issues with libssh 0.7.2 open a bug at https://red.libssh.org/