public key auth problem in chroot'd env.
Works great, except for ssh public key auth. It looks in the wrong spot for authorized_keys b/c of non-chroot /etc/passwd.
e.g.
cat /etc/passwd | grep '^prisoner'
prisoner:x:1005:81::/var/chroot:/usr/bin/jail
When logging in using public key:
Mar 9 13:32:55 catch-22 sshd[27465]: debug1: trying public key file /var/chroot/.ssh/authorized_keys
Anyone have a work-around?
3 Replies
If you have a recent(ish) ssh version (4.9 or newer, it seems), look at
i.e. when joe logs in he'll be in /chroot not /chroot/home/joe
I could do that, but I don't want a 1-to1 between chroot'd env.'s and users. I want to have 1 chroot'd env. and several users.
sshdconfig Match directive looks interesting. Wonder if there's a way to match group and tell sshd to look in a different spot for authorizedkeys for that group.
See: