You are not logged in.

#1 2010-07-02 13:07:09

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

openssh chrooting

I'd like to grant a user to use sftp on my PC. I installed openssh and it works fine, but when I want this user to be chrooted, it doesn't work. I googled for severeal hours and tried everything in vain.

sshd_conf:

Subsystem       sftp    internal-sftp

 Match User feltolt
   ChrootDirectory /home/feltolt
   ForceCommand internal-sftp

A try:

[siriusb@arch home]$ sftp feltolt@localhost
Password: 
Connected to localhost.
sftp> ls
remote readdir("/"): Permission denied
sftp> exit

The user:

feltolt:x:1002:1002:feltolt,,,,:/home/feltolt:/bin/bash
drwx------  2 root    feltolt  4096 jul    2 13.39 feltolt

So how could I jail this user into its home dir?

Offline

#2 2010-07-02 13:45:57

anrxc
Member
From: Croatia
Registered: 2008-03-22
Posts: 835
Website

Re: openssh chrooting

You are missing a dot in the passwd entry. See for example section 1.3 here http://www.howtoforge.com/chroot_ssh_sftp_fedora7


You need to install an RTFM interface.

Offline

#3 2010-07-02 14:28:55

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: openssh chrooting

You can't create a directory named "."

Offline

Board footer

Powered by FluxBB