SFTPユーザーの設定

LINEで送る
Pocket

# groupadd test
# useradd -g test -G nobody -d -s /sbin/nologin test
# passwd test

# chown root:root /var/www
# cd /var/www
# chmod -R 775 html

# vim /etc/ssh/sshd_config
Subsystem       sftp    internal-sftp

Match User test
        AuthorizedKeysFile /home/test/.ssh/authorized_keys
        ChrootDirectory /var/www/
        X11Forwarding no
        AllowTcpForwarding no
        ForceCommand internal-sftp -u 002

----


# /usr/sbin/sshd -t
# systemctl restart sshd.service

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *