当前位置:网站首页>SFTP deployment configuration
SFTP deployment configuration
2022-07-23 13:00:00 【study_ Little Daren】
sftp:
SFTP(SSH File transfer protocol ) It's a network protocol , File transfer and operation functions can be provided through any reliable data stream . It is usually with SSH-2 agreement (TCP port 22) Used together to provide secure file transfer ,
Deployment configuration :
1、 Create user group sftp
groupadd sftp
2、 Create user xinxin02
useradd -G sftp -s /sbin/nologin -d /data/sftp/test
3、 Create a password
passwd test
4、 Modify the configuration file sshd_config
vim /etc/ssh/sshd_config
Comment the following line
#Subsystem sftp /usr/libexec/openssh/sftp-server
Then add in the last line :
Subsystem sftp internal-sftp Use internally provided sftp service
Match Group sftp To configure sftp Group users
ChrootDirectory /data/sftp/%u Restrict users
X11Forwarding no Remote graphical display is local
AllowTcpForwarding no
#ChrootDirectory %h It can be used %h Represents the user's home directory %u On behalf of user name
ForceCommand internal-sftp
systemctl restart sshd
5、 Set directory permissions
chown root:sftp /data/sftp/test
chgrp -R sftp /data/sftp/test
chmod -R 755 /data/sftp/test
# Set the directory that users can upload , Under this user, users are allowed to upload, delete and modify files and folders
Match user sftpuser2
ForceCommand internal-sftp
ChrootDirectory /data/wwwroot/user2/ Repeat three lines for multiple users
边栏推荐
猜你喜欢
随机推荐
RIP 配置实例学习记录
ACL configuration instance learning record
Single arm routing configuration instance learning record
Secret key remote login server to realize secret free login
Unity3d+moba+ skill indicator (I)
Unity mouse controls camera drag, rotation and zoom (simulation editor camera function)
学习日记——(路由与交换技术)动态路由(rip协议)和静态路由
Default routing configuration instance learning record
DHCP second experiment
Unity3d+moba+ skill indicator (II)
Real questions required for Niuke interview [algorithm] summary of high-frequency TOP200 questions
Hcip --- HCIA knowledge review (I)
Hcip --- condition matching and OSPF Protocol
HCIA----07 ACL-Net
DNS domain name resolution service
C#随机生成一个分数,判断其成绩等级(优、良、中、差、不及格)
浅做一下思科实验吧!
Telnet configuration instance learning record
Analysis ideas of strong consistency and weak consistency and concurrency skills of distributed scenarios
FTP实验及概述









