- restricting a user to just sftp (i.e. no ssh access)
# useradd lame
# passwd lame
# usermod -s /usr/libexec/openssh/sftp-server lame
Download scponly tarball from here
https://github.com/scponly/scponly/wiki/Download $ tar -zxvf scponly-20110526.tgz
$ cd scponly-20110526
$ ./configure --enable-scp-compat
$ make
$ make install
$ sudo make install
Add /usr/local/bin/scponly to the /etc/shells file
$ vim /etc/shells
...
$ cat /etc/shells
...
/usr/local/bin/scponly
Add a user and give set its shell to /usr/local/bin/scponly
# useradd lame
# passwd lame
# usermod -s /usr/local/bin/scponly lame
http://sublimation.org/scponly/wiki/index.php/FAQ#What_does_.22lost_connection.22_mean.3F
No comments:
Post a Comment