Troubleshoot SSH logins in Linux warning:permanently added (RSA) to the list of known hosts

Source: Internet
Author: User

Telnet ==>

[email protected]. ssh]# SSH 192.168.9.10
warning:permanently added ' 192.168.9.10 ' (RSA) to the list of known hosts.
Last Login:fri Sep 15:37:49 from 192.168.9.11

Reported Warning:permanently added (RSA) to the list of known hosts error

because: when SSH is executed , the known_hosts file is not generated under the ~/.ssh of this machine .

Solution:
# Vi/etc/ssh/ssh_config// Note is the client settings file
The last two lines are
stricthostkeychecking No #登录时是否询问
Userknownhostsfile/dev/null #表示隐藏known_hosts文件

The two lines are explained as follows:

Stricthostkeychecking

IF This flag was set to "Yes", SSH (1) would never automatically add host keys to the
~/.ssh/known_hosts file, and refuses to connect to the hosts whose host key has changed. The default is "ask".

Userknownhostsfile
Specifies a file to use for the user host key database instead of ~/.ssh/known_hosts.
Comment out these two lines and save the file
Execute SSH 192.168.9.10 again
Prompt appears

[email protected]. ssh]$ SSH 192.168.9.10
The authenticity of host ' 192.168.9.10 (192.168.9.10) ' can ' t be established.
RSA key fingerprint is 50:e9:44:87:86:c3:0f:85:ab:41:5e:33:1e:5b:6a:c1.
Is you sure want to continue connecting (yes/no)? Yes
warning:permanently added ' 192.168.9.10 ' (RSA) to the list of known hosts.
Last Login:fri Sep 15:27:34 from 192.168.9.11

After you enter Yes, you can see that the known_hosts file was generated in the/ROOT/.SSH directory:


[Email protected]]# ls
Id_rsa id_rsa.pub known_hosts

Troubleshoot SSH logins in Linux warning:permanently added (RSA) to the list of known hosts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.