Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I try to ssh to my server from a linux computer with debian, I just get

Host key verification failed.

The only help I found online was deleting the key from ~/.ssh/known_hosts... well I did not only that, I deleted the whole ~/.ssh just to be sure, and it didn't help either, I still have Host key verification failed. error.

share|improve this question
add comment

2 Answers

So the poster's problem has been resolved. But in case others come to this question by searching and their symptoms are not coming from the same cause:

Deleting ~/.ssh/known_hosts (or just the offending line in it) will purge the cached host key. However, there is also a system-wide cache, which will be stored someplace like /etc/ssh/ssh_known_hosts. Host keys won't be cached there unless that's specifically requested. But if you're having host key verification issues, have a look in both of these files.

share|improve this answer
add comment
up vote 2 down vote accepted

OK, answered.

When I run ssh with -v option, it showed me the actual error.

It was caused by mistakenly setting wrong access rights to /dev/tty, whatever that is, and ssh somehow didn't like it. sudo chmod 777 /dev/tty seemed to fix it.

share|improve this answer
2  
Make it 666. There's no point giving execution permission to that device. –  Stephane Chazelas Sep 23 '12 at 7:56
    
OK, if you say so :) –  Karel Bílek Sep 23 '12 at 12:50
    
I have similar problem (debug1: read_passphrase: can't open /dev/tty: No such device or address) but chmod 666 /dev/tty does not help. It works with my user, but after I switched to another user with su it fails. –  dma_k Mar 28 '13 at 20:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.