In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly analyzes the relevant knowledge points on how to solve the problem of ssh landing, the content is detailed and easy to understand, the operation details are reasonable, and has a certain reference value. If you are interested, you might as well follow the editor to have a look, and follow the editor to learn more about "how to solve the ssh landing problem".
1. Error description
When I want to ssh slave the node, the following error occurs
[cpp] view plain copy
Hadoop@xuwei-laptop:~$ ssh slave
@ @ @
WARNING: POSSIBLE DNS SPOOFING DETECTED! @
@ @ @
The RSA host key for slave has changed
And the key for the corresponding IP address 192.168.0.42
Is unchanged. This could either mean that
DNS SPOOFING is happening or the IP address for the host
And its host key have changed at the same time.
Offending key for IP in / home/hadoop/.ssh/known_hosts:9
@ @ @
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@ @ @
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
E1:e0:28:39:6d:fb:d6:45:72:71:c1:ec:3d:ef:78:19.
Please contact your system administrator.
Add correct host key in / home/hadoop/.ssh/known_hosts to get rid of this message.
Offending key in / home/hadoop/.ssh/known_hosts:5
RSA host key for slave has changed and you have requested strict checking.
Host key verification failed.
The reason for the error is that I modified the slave node. It is the first time that the ip of my ssh slave node is 192.168.0.10, but the second time, the ip of slave becomes 192.168.0.50. The above error occurs when I am using the ssh slave command at this time.
3. Problem explanation
Anyone who uses OpenSSH knows that ssh will record the public key (public key) of every computer you have visited in ~ /. Ssh/known_hosts. The next time you access the same computer, OpenSSH checks the public key. If the public key is different, OpenSSH will issue a warning to protect you from attacks such as DNS Hijack. So now we just need to delete the public key of the corresponding slave node in the knows_hosts file, and then ssh slave it. We use orders.
[cpp] view plain copy
Sudo gedit known_hosts
Open known_hosts, but we find that slave cannot be found in the contents of the file. The contents of the file are as follows
[cpp] view plain copy
| | 1 | Xv9OoqvMzLO8ZB6RBgo5huXiJsM= | zwBphczddm/ogCsQfJJb8pO8CNo= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3fvljAowPKD9Lx4GkF75FQfj1edEPLTsY9TQv7S5mDS6RB8YvgP9SQxnqt0Dr+IpiDpRg6y7iv6Qm6WC4dOd4jJCPfbI4FUbGTkwLL4qeKo0+ZHZUS2ByeMd+PbqM0iIubKBsNBebA5c+RvqOCneYHOkrTKtwJsq2NnwhgFBz0odeFF7G7tBq6huK7KqikXZauEk7B4gnbtSiD2pG1XZzEUeXq8qEFLjWFPKBRYr8/AL/RZjktJRj98mCRtXCB9tef3DhFkHnXODfC/LzMX3vkQP2ahP4kbNmtXM8nkK2YFx0emAL07h76j89k9ByXzuN0mGw2QKcjFkDWNVkwk6CQ== |
| | 1 | peUXkOx+hnb6XQZZGGwMhOXAj04= | mqdXqRTi/MiqARL+dylDygmDgpk= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3fvljAowPKD9Lx4GkF75FQfj1edEPLTsY9TQv7S5mDS6RB8YvgP9SQxnqt0Dr+IpiDpRg6y7iv6Qm6WC4dOd4jJCPfbI4FUbGTkwLL4qeKo0+ZHZUS2ByeMd+PbqM0iIubKBsNBebA5c+RvqOCneYHOkrTKtwJsq2NnwhgFBz0odeFF7G7tBq6huK7KqikXZauEk7B4gnbtSiD2pG1XZzEUeXq8qEFLjWFPKBRYr8/AL/RZjktJRj98mCRtXCB9tef3DhFkHnXODfC/LzMX3vkQP2ahP4kbNmtXM8nkK2YFx0emAL07h76j89k9ByXzuN0mGw2QKcjFkDWNVkwk6CQ== |
| | 1 | 2Agq45UHkRDXi73GGuTp7roomONWyQ = | wfAq9PffuqQch0E1tsFJDGlAPQk= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3fvljAowPKD9Lx4GkF75FQfj1edEPLTsY9TQv7S5mDS6RB8YvgP9SQx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Q4kEO+MchVmuIY5cm8kz5p8jxklSF2xFftB+kz7RmMJN3+GcGHOcgACngtxqFnqXfNF8RV1wv2lP5wLui7cv7V+pogExckzqiNfJMPnt8SCMvODHVMRnlJC5yOtpkDKH29X056KeYtK40KhMCQL9UMHfRPQgvQL0qArQ65RLevIckZ8YehOG9aCXbcWzBw== |
| | 1 | QLuhhDXvYoefLiZ7+fw5A9ErlV4= | bWOSl44257+rbK1Fn4zwMY8GE3c= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAs6IHrmuZwTilgYsOjwiOfQP1u1c3Aj6MH2EOaypGYxccDddcQu6QoKhVXQZWMZFt7W6MeZUa/QKqNVmcpho4NubyCpxfkBIybPzqbqQif8EmYrCCsbaU41hQppISrXNdlcn/S7TKM9T6sbQV1/moYScjQ4kEO+MchVmuIY5cm8kz5p8jxklSF2xFftB+kz7RmMJN3+GcGHOcgACngtxqFnqXfNF8RV1wv2lP5wLui7cv7V+pogExckzqiNfJMPnt8SCMvODHVMRnlJC5yOtpkDKH29X056KeYtK40KhMCQL9UMHfRPQgvQL0qArQ65RLevIckZ8YehOG9aCXbcWzBw== |
OpenSSH introduces the Hash Known Hosts function in 4.0p1, which stores the visited computer name or IP address in hash in known_hosts, so that the intrusion can not directly know which computers you have visited. This new feature is off by default and will only be enabled if you manually add\ "HashKnownHosts yes\" to ssh_config. However, Ubuntu has a function enabled by default.
However, occasionally the ssh public key of some computers is reasonably changed. Although in these situations, OpenSSH will issue an alarm and prohibit you from accessing the computer. In the past, when we determined that there was no doubt that the ssh public key had been changed, we opened known_hosts with a text editor and deleted the relevant public key record. But now that all computer names or IP addresses are hash, it's hard to know that line is the public key of the computer concerned. Of course we can delete the entire known_hosts, but we will lose the ssh public key of other normal computers at the same time. In fact, OpenSSH has added three options to the tool ssh-keygen to help you manage hash's known_hosts. You can use\ "ssh-keygen-F computer name\" to find the relevant public key, and use the following command to find the public key corresponding to slave
[cpp] view plain copy
Ssh-keygen-F slave
After executing the command, you get the following:
[cpp] view plain copy
# Host slave found: line 5 type RSA
| | 1 | hMbmluXaSJKOv4bZydZ75Ye3OUc= | rcfbiV7hrXoaDt02BrVb9UxJSqI= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0d8quvKVdc0b620eAY46ucB87dK/Q1EqEsPOdUltfEpr7/r9hCG+yJqjM6l3roOzkkc9Fi/iZEx0pvIgDdtD+n5YEQrQu81/mj1cWXmkN9xuXvqv9BZxOTeETRF5g1cL0yr4T91CmvXIMewUzv1fE1pWOzZvMKj8SqMOn7PpTjQhpDoS8SkTuNO81k41DkyrDe3DIRL0yC6aUGTF3YOTAe4DbpF8jMHD3+wDm4JT//ULRNKSwRQPOb57XWHy9GLHm89oOm2e8wrjrz84nCRJ5hgJdsjaPt3qJEEGeb8OAMj2fevyu+e1KDF3KExSE0jGBegEWpJilxaD8AV4+1CHsw== |
The public key of the slave is given above, and the number of lines on which it is located. Let's go to known_hosts to find the corresponding public key and delete it.
This is the end of the introduction on "how to solve the ssh login problem". More related content can be searched for previous articles, hoping to help you answer questions and questions, please support the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.