Add something new to Virb:

Virb

Are you sure you want to delete that?

or Cancel

 

Posted on Jan 14, 2009

SSH Host Verification Failed Error Fix

Ubuntu LogoA couple weeks ago I showed you how to share files between two Ubuntu computers. Well yesterday I decided to install Windows 7 Beta on my secondary machine, that was running Ubuntu and had the share I created in that post. Since the computer is pretty old, I decided to just wipe the drive and install Win7 natively, rather than in a VM.


After I was done with some testing, I threw Ubuntu back on the machine and setup my shared folder again with the exact same name. Then I reconnected my main machine to the share with SSH, but was greeted with this error
SSH Verification Failed


Basically what's happening is that when you create an SSH connection, 'authentication' keys are created on the host machine (the machine with the shared folder on it). Since I had wiped Ubuntu and reinstalled, I obviously reinstalled SSH and then created my share again, but with different keys since they are randomly generated. So now when my main computer is looking for this share, it's finding it, but not able to verify the keys that it currently thinks are correct and then create the secure connection...and SSH is pretty worthless with the 'secure' part:) Luckily, there is an incredibly easy fix for this.


If You Have Only One SSH Connection


If you are only running one SSH connection you can simply run this command from the terminal
sudo rm .ssh/known_hosts


This command is going to go into your SSH folder in your Home directory and delete the Known Hosts file that tells the server connection what the keys for the shared folder should be. Again, these keys have changed because we reinstalled SSH on our machine and the keys were once again, randomly generated.


If You Have Multiple SSH Connections


Run this in the terminal
sudo gedit .ssh/known_hosts


You will be presented with something similar to this the image below. Delete the connection that you no longer want to use (in my example you would be deleting connection 2)
SSH Connections


That's pretty much all you have to do. Your connection should now work again.




Related posts:

  1. Share Files Between Two Ubuntu Computers I recently switched to Ubuntu as my primary computer. This...
  2. Connect Ubuntu 8.10 to a Windows 7 Share So I've been playing around with Windows 7 today. Figured...
  3. Can't Delete File In Ubuntu Sometimes you'll notice that one of your files has a...


Related posts brought to you by Yet Another Related Posts Plugin.

Loading comments...

Likes

Details

Viewed 4 times

© 2009 randyjensen

virb.com/t/1032333
tweet!

Flag this text post!

Flag this text post as:

or Cancel

 

Advertisement

Flag this profile!

Flag this profile as:

or Cancel