Sftp-server: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
Zeile 7: | Zeile 7: | ||
root@ricky:~# chown triaz /home/trial/ablage | root@ricky:~# chown triaz /home/trial/ablage | ||
</source> | </source> | ||
+ | =config= | ||
+ | */etc/ssh/sshd.conf | ||
+ | <pre> | ||
+ | Subsystem sftp /usr/lib/openssh/sftp-server | ||
+ | UsePAM yes | ||
+ | Match Group sftponly | ||
+ | ChrootDirectory /home/%u | ||
+ | ForceCommand internal-sftp | ||
+ | AllowTcpForwarding no | ||
+ | |||
+ | </pre> | ||
=Links= | =Links= | ||
*[http://en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP#Chrooted_SFTP_to_Shared_Directories SFTP] | *[http://en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP#Chrooted_SFTP_to_Shared_Directories SFTP] |
Version vom 24. Januar 2017, 14:00 Uhr
User und Home-Dir anlegen
root@ricky:~# groupadd sftponly
root@ricky:~# useradd -G sftponly -s /bin/false trial
root@ricky:~# mkdir /home/trial
root@ricky:~# mkdir /home/trial/ablage
root@ricky:~# chown triaz /home/trial/ablage
config
- /etc/ssh/sshd.conf
Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes Match Group sftponly ChrootDirectory /home/%u ForceCommand internal-sftp AllowTcpForwarding no