Same
tux@uml:~$ ssh localhost
Host key verification failed.
Main Topics
Browse All TopicsDear All.
I have strange problem with SSH on UML (user Mode Linux).
The network is simple
[host]-------------------[
I cannot :
* ssh from the uml to the host
* ssh to the uml itself.
tux@uml:~$ ssh 127.0.0.1
Host key verification failed
However I can:
* ssh from the host to the uml
* ssh from the host to the uml then ssh back to the host
I have deleted $HOME/.ssh or use ssh-keygen to generate new user keys,
same error happened.
I'm clueless what is wrong here.
Please help.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Oh sorry. I misunderstood.
host IP = 10.0.1.254
uml IP = 10.0.1.1
Here are the results
FROM THE UML
==========
* Failed to ssh from uml to uml itself
root@uml:~# ssh tux@10.0.1.1
Host key verification failed.
* Failed to ssh from uml to the host
root@uml:~# ssh tux@10.0.1.254
Host key verification failed.
FROM THE HOST
===========
* Successfull to ssh from host to uml
root@host:~# ssh tux@10.0.1.1
The authenticity of host '10.0.1.1 (10.0.1.1)' can't be established.
RSA key fingerprint is 91:6e:71:45:3d:61:a4:2e:aa
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.1.1' (RSA) to the list of known hosts.
tux@10.0.1.1's password:
tux@uml:~$
* Then successfull to ssh back to the host again ...
tux@uml:~$ ssh 10.0.1.254
The authenticity of host '10.0.1.254 (10.0.1.254)' can't be established.
RSA key fingerprint is ec:80:09:da:90:da:a9:08:14
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.1.254' (RSA) to the list of known hosts.
tux@10.0.1.254's password:
tux@host:~$
I have compiled a new version of openssh (1.3.7p1) in the uml.
Still not working.
Ughh .... a lot of messages
Here are the last rows.
=============
.....
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
debug2: no key of type 0 for host 10.0.1.1
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts2
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts2
debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts
debug2: no key of type 2 for host 10.0.1.1
error ENOTTY
Host key verification failed.
debug1: Calling cleanup 0x806018c(0x0)
=====================
The "error ENOTTY" was made by me.
I traced the source code, it turned out that
- SSH found that 10.0.0.1 is a new host, so it wanted to confirm
- It called a function named readpassphrase on openbsdcompat/readpassphra
- I found the error is here
=======================
/*
* Read and write to /dev/tty if available. If not, read from
* stdin and write to stderr unless a tty is required.
*/
if ((flags & RPP_STDIN) ||
(input = output = open(_PATH_TTY, O_RDWR)) == -1) {
if (flags & RPP_REQUIRE_TTY) {
errno = ENOTTY;
DEBUG("error ENOTTY"); // ERROR HERE
return(NULL);
}
input = STDIN_FILENO;
output = STDERR_FILENO;
}
=======================
So apparently, this is not openssh problem but UML problem.
The mentioned UML's TTY is opened from /etc/inittab like this
=======================
## Open one UML console
0:2345:respawn:/sbin/agett
#1:2345:respawn:/sbin/aget
=======================
I'm going to ask this to UML milist.
But please Let me know if you have any ideas.
Just generate the host key:
http://www.ssh.com/support
then try
Business Accounts
Answer for Membership
by: khkremerPosted on 2004-02-08 at 04:51:39ID: 10302787
Does it make a difference if you (on the UML) ssh to it's IP address, or to localhost?