SFTP 服务器配置

来源:互联网 发布:手机广告语制作软件 编辑:程序博客网 时间:2024/06/05 12:49
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/下建立可写属主的文件夹供上传使用

阅读(1548) | 评论(1) | 转发(0) |
0

上一篇:LINUX 初始化内核等调整

下一篇:备份,FTP上传脚本

相关热门文章
  • linux 常见服务端口
  • 什么是shell
  • 【ROOTFS搭建】busybox的httpd...
  • linux socket的bug??
  • linux的线程是否受到了保护?...
  • 公司有5T的数据用于下载,数据...
  • CACTI监控ESXI中的虚拟机,监...
  • 如何挂载一块以前做过LVM的硬...
  • 做主主同步,只同步个别的几张...
  • Linux命令行执行权限问题...
给主人留下些什么吧!~~

chinaunix网友2011-03-05 18:09:39

很好的, 收藏了推荐一个博客,提供很多免费软件编程电子书下载:http://free-ebooks.appspot.com

回复 | 举报
原创粉丝点击