Can not ssh into Slack 13.37, 'Host key verification failed'.
I have spent two days trying to get this working. I have looked at many how-tos without success.
I have Slack 64 bit installed on my desktop, sshd is running. From my netbook running Ubuntu I can not connect through ssh, I always get 'Host key verification failed' message. I have tried a lot of things, I got to a point where I could not ssh either way. So today I removed and re-installed Openssh on both systems. I made sure I was using the new ssh_config and sshd_config files on both systems. Right now I can ssh from the desktop ( Slack ) to Ubuntu ( netbook ) but not the other way around. I do not get a known_hosts file created on Slack, I do get one on Ubuntu. I don't understand why Openssh server on Slack is not accessible, and why the known_hosts file is not getting created. /var/log/packages show Quote:
Most of the suggestions I have found suggest deleting the entry for the remote host. Problem is it never gets created. How do I go about fixing this? This is a link to the last howto I followed, after the re-install of Openssh. -->http://www.linuxquestions.org/questi...-linux-419680/ |
Try
touch /home/user/.ssh/known_hosts restart ssh Also if you thinker with the sshd_config make sure your sshd_config is set back to default so you can narrow the issue down... |
check your .ssh/known_hosts
probably there's a same IP address with your Slack machine, but it was a different machine, so it failed with the authentication process the simplest way is to delete the entry and try to ssh again |
Is the sshd daemon running on the Slackware machine? (Check with 'ps ax | grep sshd').
From 'man sshd' Quote:
|
Well, no success. I have looked at each suggestion. Here is what I see.
allend. The permissions on /etc/ssh. Quote:
Willysr. The first few bytes of /home/myuser/.ssh/known_hosts. Quote:
SeRi@lDiE I tried several things. First of all, there was a known_hosts file. I could not connect. So I deleted the file, can created a new empty file with touch. I tried to connect, it failed as before. It seems to take a few minutes for the pub key to appear in /home/myuser/.ssh/known_hosts ; it does show up. As I posted above, the host name and IP address are correct, and the almost 400 character .pub key matches with the client. I still am stuck with 'Host key verification failed'. Stumped.... |
Instead of guessing, you should start by adding -v (verbose) option to ssh command to see what it's doing when you try to connect from your Ubuntu box to Slackware one. You can add up to three v's to increase verbosity, though I suggest to use single -v at first so you won't be swamped with details.
|
have you make sure that the openssh daemon has been started?
check /etc/rc.d/rc.sshd permission. It should have execute permission |
A single -v produced this:
Quote:
Yes, sshd is running. I verified that with 'ps aux | grep sshd'. |
Try explicitly specifying the use of rsa in /etc/ssh/sshd_config on the Slackware machine and turning off other key types.
Quote:
|
allend,
Tried the rsa key as you suggested, no change. I also put the # back, and tried the dsa key without the #. Didn't make any difference. |
I have found a work around. I copied the ssh_config file from slackware 13.37 and put it on the netbook. I just tested it, and I go connected. So, I'm concluding there is something in the original ssh_config file that came with Ubuntu sshd on slack doesn't like.
What gave me the clew, I dug out an old desktop, put it together, and tried it. Once I got past the the immediate disconnect caused by the hosts.allow file, I got connected to Slackware 13.37. At that point I was sure it had more to do with the Ubuntu netbook config than with sshd on slack. Now to set up user keys. Thank-you for all those who responded. Each one of you got me a little closer to a solution. |
Hmm, this is puzzling. If I understand it correctly, the client fails while trying to verify host key which it should have got from the server. I'm not sure if more verbose output from ssh client would help here, because the last few lines from your output stay mostly the same for me and, if successful, I immediately get the following:
Code:
debug1: Server host key: RSA xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx Not sure if that would help in your case, but the easiest way to regenerate keys in Slackware is to remove key files from /etc/ssh completely and restart sshd by running /etc/rc.d/rc.sshd restart Edit: Oops, a little too late with my answer... Glad that you solved your problem! |
In the interest of helping someone else, here are the lines form the original ssh_config file that came with ssh on Ubuntu 10.04.
Quote:
|
Looks like BatchMode was the culprit here:
Quote:
|
All times are GMT -5. The time now is 05:26 AM. |