Thursday, November 3, 2011

ssh Host key verification failed from within a jail

ssh Host key verification failed from within a jail

>>Greetings:
>>
>>I currently am running Freebsd 6.0 Release.
>>
>>I am experimenting with jails and have run into a
>>problem. I need to ssh from within my jail to another
>>server. Actually I need to use scp. WHen I try it I
>>get the error: "Host key verification failed."
>
>
> This could also be something related to permissions on the .ssh
> directory, but you cleared that out of the way if i understand the
> rest of this thread correctly. I remember having this problem once,
> but can't remember right now what i did to solve it.. I usually
> compile openssh from source anyway, so you might try that. If that
> works, it would probably be interesting to see what is the
> difference between your own hand-rolled openssh and the one that
> came with your world.

Just remembered something else: do you jexec into the jail, or do
you do a proper logon (eg. ssh into the jail). I think that if you
jexec into the jail and then try to ssh, you might have a problem
because you aren't really logged in to the jail and thus have no
(psuedo) tty associated with your session..

Koen

I just saw this thread. Yes, you are right, I can confirm this.
To be able to ssh to another server from within a jail, you need to
log in to the jail properly (have access to your terminal), so
jexec won't work here.
Try to ssh into the jail and then ssh to another box.

http://lists.freebsd.org/pipermail/freebsd-hackers/2005-November/014442.html

No comments: