Sunday, March 3, 2013

SSH Host key verification failed on vps - WHM account transfer ssh issue



If you see the following error when attempting WHM account transfer. SSH root password will not be authenticated.
sshcmdpermissiondeny

From vps ssh try to ssh into the source IP and see if you get this error.

root@server1 [~/.ssh]# ssh -l root IP
Host key verification failed.
Sol:-
Try ssh with -v option

root@server1 [~/.ssh]# ssh -l root IP -vv
OpenSSH_5.9p1, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH_3.*
----
----
----
debug2: bits set: 496/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 05:d9:7c:4d:70:30:b5:92:86:bf:e5:04:2c:a4:3b:fa
debug1: read_passphrase: can't open /dev/tty: No such file or directory
Host key verification failed.

See the last lines. It says there is no /dev/tty. Create tty from the vps and add that to /etc/rc.local file.
/sbin/MAKEDEV tty
/sbin/MAKEDEV pty
Add the above commands to /etc/rc.local file.
Now try to ssh to remote host.

root@server1 [~/.ssh]# ssh -l root IP
The authenticity of host '72.34.43.69 (72.34.43.69)' can't be established.
RSA key fingerprint is 05:d9:7c:4d:70:30:b5:92:86:bf:e5:04:2c:a4:3b:fa.
Are you sure you want to continue connecting (yes/no)?

No comments:

Post a Comment