当前位置:网站首页>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
边栏推荐
- PPP 配置实例学习记录
- OSPF comprehensive experiment
- 2020-10-16
- 深度优先找出图中顶点U到顶点V的所有简单路径
- Homework of the fifth week
- Hcip ---- relevant knowledge points of GRE protocol, mGRE environment and OSPF Protocol
- 三层交换配置实例学习记录
- Learning diary - (routing and switching technology) layer 3 switch
- ACL configuration instance learning record
- vlan配置实例学习记录
猜你喜欢

Gameframework: resource hot code analysis, check version information, download version files, verify version files, get the number of updated files, download files, taskpool

DHCP configuration instance learning record

DHCP 配置实例学习记录

Hcip --- condition matching and OSPF Protocol

Hcip --- mGRE comprehensive experiment

Do a Cisco experiment!

RIP 配置实例学习记录

VLAN configuration instance learning record

秘钥远程登录服务器实现免密登录实战

Link expansion configuration of OSPF
随机推荐
学习日记(路由与交换技术)——浮动静态路由和缺省路由
Build FRPC client in NAS [super brainless]
Write a test case where the executable depends on.So
Pod 拓扑约束
学习日记——(路由与交换技术)网络地址转换 NAT技术
Integer times integer overflow
学习日记——(路由与交换技术)DHCP(动态主机配置协议)
在二叉排序树中删除节点
Jenkins deployment
RIP 配置实例学习记录
sftp部署配置
HCIA----06 OSPF
How to solve too many if statements
默认路由配置实例学习记录
OSPF 单区域配置实例学习记录
Design experience of log file IO system
Unity3d: vector calculation, AOE graph intersection
2020-09-22
Hcip - HDLC and PPP protocols
Understanding of LSM tree (log structured merge tree)