I\'ve reinstalled my server and I am getting these messages:
[user@hostname ~]$ ssh root@pong
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
For Mac users, you can use the -R
flag of the ssh-keygen
command. Quick example:
ssh-keygen -R THE_IP_ADDRESS
THE_IP_ADDRESS
being the IP you're trying to ssh into. And then you can connect fine.
Works for me!
Error: Offending RSA key in /var/lib/sss/pubconf/known_hosts:4
This indicates you have an offending RSA key at line no. 4
Solution 1:
1.
vi /var/lib/sss/pubconf/known_hosts
2.
remove line no: 4
.3.
Save and Exit, and Retry
.
Solution 2:
ssh-keygen -R "you server hostname or ip"
OR
Solution 3:
sed -i '4d' /root/.ssh/known_hosts
This will remove 4th
line of /root/.ssh/known_hosts
in place(-i
).
In my case it happened because I previously had ssh connection with a machine with same ip(say 192.152.51.10) and the system was considering the RSA key(stored in /home/user_name/.ssh/known_hosts) of the previous host which resulted in mismatch.
To resolve this issue, you have to remove previously stored RSA key for the ip 192.152.51.10.
ssh-keygen -f "/home/user_name/.ssh/known_hosts" -R 192.152.51.10
SOLUTION:
1- delete from "$HOME/.ssh/known_hosts" the line referring to the host towards which is impossible to connect.
2- execute this command: ssh-keygen -R "IP_ADDRESSorHOSTNAME" (substitute "IP_ADDRESSorHOSTNAME" with your destination ip or destination hostname)
3- Retry ssh connection (if it fails please check permission on .ssh directory, it has to be 700)
Edit /home/hostname /.ssh/known_hosts
,and delete the 4 lines, and save it.
Then run ssh root@pong
again, you will see message like this:Are you sure you want to continue connecting (yes/no)? yes
, just print yes
.
Note: If you got some problem, read the hints first, it will help.
I had this problem, and the reason is very simple, I have a duplicated IP address to ssh login, so after modify this problem, everthing is solved.