How to Solve Warning: Permanently added ‘ 192.168.1.230′(RSA) to the list of known hosts.

Premise

When I was running SSH 192.168.1.230 remote on the newly installed red hat linux 5. X system, the following error occurred:

Warning: Permanently added ' 192.168.1.230'(RSA) to the list of known hosts.

Of course, I set the fixed IP first

1. Switch root and use: Su-

2. Delete all the lines in the/etc/hosts file that begin with #

3. Modify ifcfg-eth0 file. Change the bootproto item to bootproto = static

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Add directly at the end of the file:

IPADDR=192.168.1.230
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.1
PREFIX=24

4. Save and restart

 

Solutions

After the restart of the system is completed, the first remote connection with SSH 192.168.1.230 in the Red Hat Linux 5. X system appears the above error.

Solution:

1. Switch to root and use: Su -. It is necessary to switch the root user here, because the/etc/SSH/SSH of ordinary users_ Under config, there may be no # stricthostkeychecking ask item.

2. vim /etc/ssh/ssh_ config。 Find # stricthostkeychecking ask and remove the comment directly. If not, suggest to change the ask to No

Here’s what I changed directly:

3. Save and exit.

Similar Posts: