Host key verification failed error

HI

i am getting host key verification failed error.

[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

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

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.

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.

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.