Sftp-server

Aus xinux wiki
Wechseln zu: Navigation, Suche

User und Home-Dir anlegen

<source lang=bash> root@ricky:~# mkdir /users/ root@ricky:~# groupadd sftponly root@ricky:~# useradd -G sftponly -d /users/anton -s /bin/false anton root@ricky:~# mkdir -p /users/anton/ablage root@ricky:~# chown anton /users/anton/ablage </source>

config

  • /etc/ssh/sshd.conf
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
Match Group sftponly
        ChrootDirectory /users/%u
        ForceCommand internal-sftp
        AllowTcpForwarding no

Links