When I try to connect through SSH from inside the JAIL I get this error:
# ssh [email protected]
...
debug1: read_passphrase: can not open / dev / tty: No such file or directory
Host key verification failed.
Outside JAIL everythng is working properly. Any ideas?
Steps to reproduce:
# jls
JID IP Address Hostname Path
1 10.10.3.1 demo.example.com /jails/demo
# jexec 1 tcsh
(inside jail:)
# ssh [email protected]
Does your jail root have a populated /dev filesystem through a devfs mount? It looks like it doesn't right now.
Important note: You should be able to use devfs rules to limit the devices visible to jailed processes. In particular, access to raw disk device nodes is a bad idea. The jail(8) manpage describes this near the following paragraph:
You should be able to mount devfs under
/jails/demo/dev
and apply the recommended jail device rules by running as root the following commands:Of course, you can also write a custom ruleset in
/etc/defaults/devfs.rules
, even a special devfs ruleset that only applies to a specific jail.For more details see also the manpages for jail(8), devfs(8), and devfs.rules(5).