You are not logged in.

#1 2014-08-19 18:51:09

sjg
Member
From: UK
Registered: 2007-02-10
Posts: 63

[Solved] SSH Host Key Verification - Strange Problem

Hi all,

I am having some issues with SSH. Just got a new computer, and for some reason I am unable to connect to any SSH server, either on my home network or over the internet.

Every time I try to connect, it fails with the "Host key verification failed" message.

As I said, this is a new computer, so known_hosts is empty. Trying to connect with -vvv verbose logging confirms that no entries are present for the server I am trying to connect to.

I tried changing the encryption algorithm, but still no joy.

Even the most verbose output from SSH gives me nothing to go on to figure out why it isn't working, and I've never had this issue before.

Can anyone help?

Thanks in advance

Last edited by sjg (2014-08-25 16:39:57)

Offline

#2 2014-08-19 19:03:50

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [Solved] SSH Host Key Verification - Strange Problem

Did you set /etc/ssh/sshd_config to use only host key verification?  If so you might need to generate a new key and temporarily configure ssh to just use password authentication (challengeresponse yes ... I think that's the line in sshd_config).  That's the only way I can get my new key to be copied to my other computer.

Offline

#3 2014-08-19 19:40:39

sjg
Member
From: UK
Registered: 2007-02-10
Posts: 63

Re: [Solved] SSH Host Key Verification - Strange Problem

Nope - in fact the only change I made to ssh_config was to change the default port to one I use across all my servers.

That's what I can't understand - this is pretty much an "out of the box" ssh install on a new system, something I have done many times before.

Offline

#4 2014-08-19 19:53:33

sjg
Member
From: UK
Registered: 2007-02-10
Posts: 63

Re: [Solved] SSH Host Key Verification - Strange Problem

OK, have managed to get it to work by specifyng "StrictHostKeyChecking no" for the first time connecting to each host. If I do this, it adds the host to known_hosts and works fine. Once I have done this, I can then modify the config file to specify "StrictHostKeyChecking yes" or just leave it to the default "ask" behaviour, and connecting to the host still works.

I have tried all 5 of my servers and doing this will allow me to connect, so my problem is at at least partially solved. 

Any idea why this should happen though?

Offline

#5 2014-08-19 21:28:18

midixinga
Member
Registered: 2014-01-18
Posts: 193

Re: [Solved] SSH Host Key Verification - Strange Problem

sjg wrote:

OK, have managed to get it to work by specifyng "StrictHostKeyChecking no" for the first time connecting to each host

and that is ssh_config NOT sshd_config, right ?

No idea, in the default ssh_config all settings are commented

Offline

#6 2014-08-23 20:52:51

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [Solved] SSH Host Key Verification - Strange Problem

Please mark this thread as [solved].  midixinga, you might want to start your own thread if you need help with ssh.

Offline

#7 2014-08-28 21:21:21

midixinga
Member
Registered: 2014-01-18
Posts: 193

Re: [Solved] SSH Host Key Verification - Strange Problem

MoonSwan wrote:

Please mark this thread as [solved].  midixinga, you might want to start your own thread if you need help with ssh.

Beg my pardon, Mr. MoonSwan; but I know the difference between sshd_config and ssh_config !
The ThreadOwner had a ssh-CLIENT problem , you see ?

Last edited by midixinga (2014-08-28 21:25:06)

Offline

#8 2014-08-28 21:27:49

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [Solved] SSH Host Key Verification - Strange Problem

I do and thank you for pointing that out. 

And it is Miss MoonSwan.  smile

Offline

Board footer

Powered by FluxBB