我是靠谱客的博主 土豪羽毛,最近开发中收集的这篇文章主要介绍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 服务器配置所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部