Between Linux and Anime

Kind of like Schrodinger's Cat

“The host key for this server was not found, but another type of key exists.” When using sftp with dolphin/KIO

I’m halfway through my Cosfest X.1 event post, but I bumped into yet another funny issue while working today, so I’m gonna do another quick solve-it post here. If you ever had the following error message shown to you when attempting to access an sftp location via dolphin or KIO in general:

“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 might be for you. In particular if you have successfully ssh-ed into the target host before. Following the discussion here, it appears that the problem, in summary, is KIO not being able to recognize a particular (new?) format of specifying a host in the ssh known_hosts list (a bug which has been filed here). Fortunately there is a workaround – since KIO is unable to recognize the known_hosts entry that ssh produces, we simply need to get KIO to be the one to produce the entry.

Back up your ~/.ssh/known_hosts file, then open it with your favorite text editor. Find and remove the entries associated with the host you’re trying to sftp into. If you cannot find it you can just delete everything in the file – with the side effect that you will be prompted again to add the keys back the next time you ssh into a previously known location. When you’re done, open dolphin and attempt to sftp into your desired target location. It should prompt you to add the host’s key – just tell it yes and you should be able to log in successfully.

That’s it! From then on you should be able to direct ssh or sftp-via-KIO into the location whenever you want.

Rate this post
An error occurred!

  • Facebook
  • Twitter
  • Delicious
  • Digg
  • StumbleUpon
  • Add to favorites
  • RSS
  • Reddit


Smplayer UI hanging after update in OpenSUSE?


Photoogling at Cosfest X.1 2011


  1. Thanks so much for this mate!

    KDE really needs to add a key management app instead of just falling over whenever something like this happens.

  2. Jason "moofang"

    My pleasure :)

  3. Martin

    Such an evident message – once you realise what the heck they’re talking about >:D
    Thanks pal!

  4. pollysanders

    Thanks for this post. Totally helped me!

  5. Timothee Groleau

    Thanks for that! Saved me tonight :)

  6. Alex

    2 years after, you are a life saver!

  7. Zaar

    Thanks! Helped me as well.

    The bug is still unfortunately in Kubuntu 13.04

  8. Dimitris

    Had the same problem in linux mint 14 with KDE. The problem is due to kio not being able to recognize ecdsa ssh keys (the new prefered type of keys). So even though you have setup your .ssh/config and can connect through command line just fine, dolphin fails to do so. I managed to work around the problem in a much simpler way. In dolphin’s address bar just type in fish://myserver/ instead of sftp://myserver/ . Set up your ~/.ssh/config to store all details such as real host name, port, username and ssh key to use. That way you don’t need to change any keys in known hosts or the server. Hope this helps.

  9. Anutosho

    KDE’s KIO is really a remarkable piece of shit, and obviously nobody cares. It has cost me hours and days of my life with all kinds of errors and flaws, not only the ssh thing.

  10. The bug has been fixed in libssh 0.6.0 – when it ships with the next distribution, it will work.

  11. Someone with the same problem

    A quick workaround until the issue is fixed is to remove the key using ssh-keygen:

    ssh-keygen -R hostname


  12. Silly Linux User

    I hit this problem in libssh 0.6.3. Dimitris seems to be correct about the ECDSA compatibility.

  13. Marcelo

    Just saved a life. Congrats!

  14. MadMartian

    7 years later and this is still a bug?

  15. Thanks for this – with Linux there are too many things to remember (at least at my age)! I’ve been thru this path several times before and it’s still not fixed yet. Couldn’t recall the solution so thanks again for the precise directions.

  16. Geoffrey

    Thank-you !
    7 years after your post, I had to use it (kubuntu 18.10 with KIO 5.50)

  17. I was able too find good information from your articles.

    My wewbpage – derma roller uk

  18. Some students get scared to start writing. They want to make sure they have all their thoughts organized in their head before they put anything down on paper.

  19. If you’re trying to find a professional essay writing support but don’t know where to begin looking, you’ve arrived at the perfect location. If that is what you are thinking of right now, you came to the ideal spot. Many professional writers are willing to offer you your time back! Any academic degree will provide you access to these writers and much more. Whether you want a rough draft article, a polished MA-level essay or an AP Exam essay, these authors will have it all.

  20. I have no idea how this company managed to do this research paper so quickly and professionally. But the result is magnificent. Well-structured, brilliantly written and with all the elements I asked for. I am already filling out my next order from service.

Leave a Reply

Powered by WordPress & Theme by Anders Norén