Host key verification failed error

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Host key verification failed error
# 1  
Old 02-23-2017
Host key verification failed error

HI

i am getting host key verification failed error.

Code:
[root@pe1zz1 scripts]# cat id_rsa.pub | ssh root@10.110.51.245 'cat >> .ssh/authorized_keys;exit;'
cat: id_rsa.pub: No such file or directory
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
e3:7c:d9:f2:3e:f1:9a:58:17:48:89:f8:62:ae:31:fc.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
RSA host key for 10.110.51.245 has changed and you have requested strict checking.
Host key verification failed.

i have googled and found the way out to fix the problem which mentioned below

Code:
sed -i '1d' ~/.ssh/known_hosts

but i am not sure the after affect of this. as i have to work live servers.

is this the safe way ?
please let me know the after affect of this ?

Regards,
scriptor
# 2  
Old 02-23-2017
Has the target host changed recently (eg. been re-imaged, reinstalled or assigned a new IP)?
If so opening the .ssh/known_hosts file and removing the record for the previous host at that IP is safe, if you have not expected a change in host you should verify the cause of the change before changing the hosts identifying record.
# 3  
Old 02-23-2017
Quote:
Originally Posted by scriptor
HI

i am getting host key verification failed error.

Code:
[root@pe1zz1 scripts]# cat id_rsa.pub | ssh root@10.110.51.245 'cat >> .ssh/authorized_keys;exit;'
cat: id_rsa.pub: No such file or directory
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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
e3:7c:d9:f2:3e:f1:9a:58:17:48:89:f8:62:ae:31:fc.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:1
RSA host key for 10.110.51.245 has changed and you have requested strict checking.
Host key verification failed.

i have googled and found the way out to fix the problem which mentioned below

Code:
sed -i '1d' ~/.ssh/known_hosts

but i am not sure the after affect of this. as i have to work live servers.

is this the safe way ?
please let me know the after affect of this ?

Regards,
scriptor
On default mode, the first time ssh tries to connect to a node it records a fingerprint signature of the node in the file known_hosts and it associates that signature with the fqdn or ip it was used. In subsequent connections it will consult with that record to verify it is the same. If another node is used with the same fqdn or ip address it will complain, since it could be that another box is pretending to be the node you want to login to.
It is even safe to delete the whole known_hosts, as it will not affect any remote live servers. However, you'll loose those saved recorded first identifications.
# 4  
Old 02-23-2017
The message all but tells you what to do. Line 1 of your ~/.ssh/known_hosts does not match the key it remembers for this host. If that's okay, you can delete line 1 and reconnect. If there's no reason for it to have changed, someone may be playing funny games with your connection and beware.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Ping to remote host failed

Actually. I was getting a ping to remote host failed for one of my etherchannel. When I checked it was in backup adapter and again I use to faileover and brought to primary channel. But it was again going to backup channel and giving me the alert ping to remotehost failed. When I checked the load... (3 Replies)
Discussion started by: Mohamed Thamim
3 Replies

2. Solaris

Need to recover/move diskgroup from failed host to another host

Hi All I am having VxVm on two Solaris hosts. host1 is using disk group dgHR. right now this server went down due to hardware fault. Not I need to import this dgHR into host2 server. Please let me know the procedure for the same. (1 Reply)
Discussion started by: amity
1 Replies

3. Solaris

Solaris logs - Tracking failed attempts from my host

Hey all I'm having a big problem here. Someone is attempting an SSH to a destination host on which an account resides and locking the account. I'm trying to determine who is performing the SSH attempts from my host. For instance they're logged in as their standard account but then (I'm assuming)... (13 Replies)
Discussion started by: MaindotC
13 Replies

4. UNIX for Dummies Questions & Answers

Host key verification failed in openssh

Experts, We are trying to make a key-based authentication from Server A to Server B. Server A is installed with openshh. Server B runs "Sun_SSH_1.1". Server A's rsa2 public key has been added into the server B's authorized_keys. We are sure that permission settings of the files and folders in... (1 Reply)
Discussion started by: rprajendran
1 Replies

5. UNIX for Dummies Questions & Answers

host key issue via java

Hi, I am encountering below mentioned exception when I execute my Java program that is supposed to SFTP the file from one server over to another. Can you please tell me some pointers to resolve this issue? Exception HostName- 10.1.1.1 ; userName- bmsftp log4j:WARN No appenders could be... (0 Replies)
Discussion started by: prashant.ladha
0 Replies

6. Shell Programming and Scripting

Host Key verification failed

Hi, I am running a script to scp a file from one server to another. I have created the public/private key and copied the public key to the other server and appended it to authorized_key file. But i am getting the error message saying "Host Key verification failed" Connection lost. It works well... (3 Replies)
Discussion started by: ahamed
3 Replies

7. UNIX for Advanced & Expert Users

RSA host key addition

Guys How do i add RSA key for a host ? I was able to connect to a host some time back but now its not connectable ,via SSH. Message i get is : abhi@myHost:~/.ssh> ssh eatcid@yourHost @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION... (3 Replies)
Discussion started by: ak835
3 Replies

8. AIX

Ssh installation error "RSA key generation failed"

While trying to upgrade ssh from v4.7 to v5.0 on AIX 5.3 TL9, I end up with the following error. Has anyone come across this? Note: openssl has been upgraded to 0.9.8.840 before this upgrade Bala (0 Replies)
Discussion started by: balaji_prk
0 Replies

9. AIX

installp -C error: 'bosboot verification failed'

Hi, I'm a noob with AIX, can anybody help me solve this issue I'm stuck with on an 5.3 box. bash# installp -C 0503-409 installp: bosboot verification starting... 0503-497 installp: An error occurred during bosboot verification processing. Thanks. (4 Replies)
Discussion started by: thebytegrill
4 Replies

10. UNIX for Dummies Questions & Answers

Signiture verification failed

Hello, I am new to Solaris. I've installed Solaris 10.0 and trying to apply all patches. On Java Desktop, I've applied almost all patches but some of patches should be applied manually on the command line. The patches -should be applied manually on terminal- are downloaded by Sun Update... (1 Reply)
Discussion started by: XNOR
1 Replies
Login or Register to Ask a Question