OpenSSH安装,版本要高于4.8sp1
openssl版本高于0.9.6
# tar zxvf openssh-5.4p1.tar.gz
# cd openssh-5.4p1
# ./configure --with-ssl-dir=/usr/local/ssl #openssl的安装位置
# make
# make install
配置文件:
/dicc/sftp_sshd/sshd_config
================
Protocol 2
Port 2122
SyslogFacility AUTHPRIV
PasswordAuthentication yes
ChallengeResponseAuthentication no
AllowTcpForwarding no
X11Forwarding yes
UseDNS no
ChrootDirectory /home/%u
Subsystem sftp internal-sftp
Match group sftp
ForceCommand internal-sftp
======================
权限:
groupadd sftp
chown root.sftp /home/sftp
useradd -d /home/sftp -s /bin/false -g sftp
启动:
/usr/local/sbin/sshd -f /dicc/sftp_sshd/sshd_config
PS:因为用了chroot,所以SFTP文件夹属主一定要是root,并且组权限不能写入,如果上传需要写入在/home/sftp/下建立可写属主的文件夹供上传使用
最后
以上就是土豪羽毛最近收集整理的关于sftp服务器配置文件,SFTP 服务器配置的全部内容,更多相关sftp服务器配置文件,SFTP内容请搜索靠谱客的其他文章。
发表评论 取消回复