Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[staff@ws061 staff]$ scp wine-20041019-mdk.i586.rpm 10.255.240.102://home/staff/
No RSA host key is known for 10.255.240.102 and you have requested strict checking.
Host key verification failed.
lost connection
[staff@ws061 staff]$
what this error means?
how to overcome this?
thanks.
Originally posted by bruse
[staff@ws061 staff]$ scp wine-20041019-mdk.i586.rpm 10.255.240.102://home/staff/
[staff@ws061 staff]$
Hey! Just noticed one thing, I always did scp with a single '/'.
I mean instead of using 10.255.240.102://home/staff/ I use 10.255.240.102:/home/staff/
Is there any difference or was the earlier one a typo.
Originally posted by Rinish If Iam not wrong, Fish uses port 22 (ssh/scp) but they does'nt check any Authentication keys such as RSA and DSA by default.
/ Rinish (rinishriju)
This is what I get when I try to access some unknown host (say 10.10.11.32) via FISH :
Code:
The authenticity of host '10.10.11.32 (10.10.11.32)' can't be established.
RSA key fingerprint is 36:db:e9:17:73:dd:79:8c:8f:f5:bf:90:5c:2a:9b:35.
Are you sure you want to continue connecting (yes/no)?
Yes No
Hey, here's how you fix your problem. ssh grabs information from the computer that you are connecting to and stores it in a file. If the computer you are connecting to ever reboots or reconfigures its keys, the stored key you have on your computer will no longer work. When this happens, the easiest way (I have found) to resolve the issue is to go into that file where the key information about the other computer is stored and erase that computer's entry. You can then re-connect and get new key information that your computer will accept.
The file is called known_hosts. It is stored in your user's home directory inside a folder called .ssh. You won't see this folder during a normal directory listing (ls), but if you use ls -a you will see it. So the full path is then /home/<username>/.ssh/known_hosts
Use your editor of choice (mine is vi) to access that file. You will see an entry for every computer you have ever used ssh to access. For each computer there will be an entry similar to the following:
This is all one entry. You can identify the entry belonging to the computer in question by the IP address. Delete that entire line(in vi you just move the cursor to the line and type dd). Save the file and exit (in vi the command for that is :wq!) .
When you are finished with that, you can connect into the remote computer again with ssh. You will have to type 'yes' again when it asks if you want to accept the host key. At that point it should be working properly.
Originally posted by svenwinkle Hey, here's how you fix your problem. ssh grabs information from the computer that you are connecting to and stores it in a file. If the computer you are connecting to ever reboots or reconfigures its keys, the stored key you have on your computer will no longer work. When this happens, the easiest way (I have found) to resolve the issue is to go into that file where the key information about the other computer is stored and erase that computer's entry. You can then re-connect and get new key information that your computer will accept.
The file is called known_hosts. It is stored in your user's home directory inside a folder called .ssh. You won't see this folder during a normal directory listing (ls), but if you use ls -a you will see it. So the full path is then /home/<username>/.ssh/known_hosts
Use your editor of choice (mine is vi) to access that file. You will see an entry for every computer you have ever used ssh to access. For each computer there will be an entry similar to the following:
This is all one entry. You can identify the entry belonging to the computer in question by the IP address. Delete that entire line(in vi you just move the cursor to the line and type dd). Save the file and exit (in vi the command for that is :wq!) .
When you are finished with that, you can connect into the remote computer again with ssh. You will have to type 'yes' again when it asks if you want to accept the host key. At that point it should be working properly.
Good luck!
Correct me if I am wrong.
I also have experienced the problem you have mentioned i.e. if the host computer changes it's keys (not reboots) you get such an error and the best solution is to delete the entry corresponding to that particular I.P. from the ~/.ssh/known_hosts file.
But in that case the error you get is somewhat like this (I do not remember the exact error, though) : Remote key for concerned host has been changed. Host key verification failed. This might mean that somebody is spying on you, if this is not the case, edit the file ~/.ssh/known_hosts.
But in case of Bruse, he is getting the error : No RSA host key is known for 10.255.240.102 and you have requested strict checking.
Host key verification failed.
lost connection
This indicates that the RSA key does not exist (not changed), and since the user has requested strict checking Host key verification has failed.
I may be wrong though as I do not remember exactly what error you get in case of changed RSA keys.
My Apologies if that is the case
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.