Re: Chroot Jail for SSH

From: Nico Kadel-Garcia (nkadel@bellatlantic.net)
Date: 01/11/02


From: "Nico Kadel-Garcia" <nkadel@bellatlantic.net>
Date: Fri, 11 Jan 2002 02:28:57 GMT


"Tomas Byrnes" <tomb@NOSPAMbyrneit.net> wrote in message
news:Xns91926680EB16Dtombbyrneitnet@24.0.3.73...
> Does anyone know how to JAIL an SSH and SFTP session to their home
> directory? (Linux 7.2, Openssh)
>
> Adding /./. at the end of the home directory in etc/passwd has them come
in
> with their home chrooted, but a simple cd .. (or cd /etc, which I'm more
> worried about) gets them out of it. Ditto for sftp sessions (absolute path
> in windows works to change to any directory).

If "cd .." gets them out of the jail, then they are not chrooted. I recently
published an updated patch for OpenSSH 3.0.2p1 (based on someone else's
original patch) to do the chroot from sshd, but you also need the local
environment created correctly for the user with the key binaries and a
usable shell with any required libraries.

Which OpenSSH version are you using, and did you apply the patch?



Relevant Pages

  • openssh3.5p1: new functionality added, modifications done
    ... This is NOT an official or unofficial openssh announcement, patch, release ... secure ftp services for our web content developers. ... there is no server-side control over umask and file permissions. ... I'm running openssh with my patch on my servers, and am quite happy with it. ...
    (SSH)
  • SUMMARY: Trouble last after SSH + LDAP
    ... As it turned out this is an issue with OpenSSH 4.3p1. ... Did a make distclean, applied the patch, and rebuilt with no problems. ... authentication against an OpenLDAP server. ... PAM LDAP module 1.80 ...
    (SunManagers)
  • [UNIX] OpenSSH IP Restriction Bypass (adv.option, Patch Available)
    ... OpenSSH IP Restriction Bypass ... Apply the following patch. ... The information in this bulletin is provided "AS IS" without warranty of any kind. ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
    (Securiteam)
  • Re: sshd, sftp & umask settings (ssh.com 2.4.0)
    ... This is a problem with openssh as well. ... I just posted this patch a few minutes ago. ... > I found that ssh.com's sshd has a configuration option to use the umask ... > setting in the .cshrc file by setting the following in ...
    (comp.security.ssh)
  • Re: AIX patch works for Openssh but not Putty
    ... >>I have applied a patch to openssh to get it working with AIX password ... If I ssh to the daemon using openssh ssh it works fine. ... > As far as I know PuTTY does not handle PASSWD_CHANGEREQ. ...
    (comp.security.ssh)