我是靠谱客的博主 土豪羽毛,这篇文章主要介绍sftp服务器配置文件,SFTP 服务器配置,现在分享给大家,希望可以做个参考。

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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(65)

评论列表共有 0 条评论

立即
投稿
返回
顶部