Difference between revisions of "The host key for this server was not found, but another type of key exists."

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(Created page with "<hide> thing type::error message </hide> ==About== This error occurs when connecting to a remote server via ssh. Applications which use ssh or the ssh kioslave, su...")
 
(another fix; more documentation; full text)
 
Line 1: Line 1:
 
<hide>
 
<hide>
 
[[thing type::error message]]
 
[[thing type::error message]]
 +
[[full text::The host key for this server was not found, but another type of key exists.<br>An attacker might change the default server key to confuse your client into thinking the key does not exist.<br>Please contact your system administrator.]]
 
</hide>
 
</hide>
 
==About==
 
==About==
This error occurs when connecting to a remote server via [[ssh]]. Applications which use ssh or the ssh [[kioslave]], such as [[KDE/Kate|Kate]], may also display it.
+
The complete error message is:
 +
<blockquote>
 +
: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.
 +
</blockquote>
  
The solution is to edit ~/.ssh/known_hosts, removing lines which may be referring to the host causing the error. It may not be clear which line(s) are responsible, but it's okay to remove any lines you don't recognize; the worst that will happen is that ssh will ask you to authorize connections to servers you had already authorized.
+
This error occurs when connecting to a remote server via [[ssh]] or [[sftp]]. Applications which use ssh or the ssh [[kioslave]], such as [[KDE/Kate|Kate]] or [[KDE/Dolphin|Dolphin]], may also display it.
 +
==Solutions==
 +
We don't know exactly what causes this problem, nor have we found any solution that works all the time, but the odds are good that one of the following will:
 +
* Remove references to the given hostname (where you're trying to do "ssh {{arg|user}}@{{arg|host}}" or "sftp://{{arg|user}}@{{arg|host}}") from your local ~/.ssh/known_hosts
 +
** The quick way to do this is <code>[[ssh-keygen]] -R {{arg|hostname}}</code>
 +
** Example of this ''not'' working: [http://askubuntu.com/questions/616506/error-the-host-key-for-this-server-was-not-found 2015-04-30] (using [[KNetAttach]])
 +
* Use '''fish://''' instead of '''sftp://'''.
 +
** Example of this ''not'' working: [https://forum.kde.org/viewtopic.php?t=93475 2011-02-12] (KDE 4.6.0 / openSUSE 11.3)

Latest revision as of 22:18, 4 August 2015

About

The complete error message is:

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.

This error occurs when connecting to a remote server via ssh or sftp. Applications which use ssh or the ssh kioslave, such as Kate or Dolphin, may also display it.

Solutions

We don't know exactly what causes this problem, nor have we found any solution that works all the time, but the odds are good that one of the following will:

  • Remove references to the given hostname (where you're trying to do "ssh <user>@<host>" or "sftp://<user>@<host>") from your local ~/.ssh/known_hosts
  • Use fish:// instead of sftp://.
    • Example of this not working: 2011-02-12 (KDE 4.6.0 / openSUSE 11.3)