Create sftp only accounts on ubuntu server
Submitted by rac on 25 November, 2011 - 23:52.
Configuring OpenSSH
Edit the file /etc/ssh/sshd_config and change the line that starts with
Subsystem sftp /.....
to
Subsystem sftp sftp-internal /.....
and add following block at the end of this file:
Match group filetransfer ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
Finally restart OpenSSH
/etc/init.d/ssh restart
Create the sftp only group
addgroup filetransfer
Create a user and jail it into that group (no SSH login allowed for them)
adduser username usermod -G filetransfer username chown root:root /home/username chmod 755 /home/username
Create an upload dir
mkdir /home/username/upload chown username:username /home/username/upload
Trackback URL for this post:
http://www.2030.tk/trackback/259
»
- Visit Source
- Download PDF
- Printer-friendly version
- 2180 reads

Post new comment