In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The server is connected to the external network!
1.ping gateway (can reach the next step)
2.ping www.baidu.com
Please check dns if you can't.
Vim / etc/resolv.conf
Nameserver 114.114.114.114
This server has two external network ports, so pay attention to it when configuring.
* * CentOS7 installation SFTP operation tutorial * *
View openssh version (openssh version must be greater than 4.8p1)
Ssh-V
Create a sftp group
Groupadd sftp
Create a sftp user
Useradd-g sftp-s / sbin/nologin-M sftp
Passwd sftp
Enter password
Create a catalog
Mkdir-p / data/sftp/mysftp
Usermod-d / data/sftp/mysftp sftp
Modify sshd_config
Vim / etc/ssh/sshd_config
Comment out Subsystem sftp / usr/libexec/openssh/sftp-server
Finally add
Subsystem sftp internal-sftp
Match Group sftp
ChrootDirectory / data/sftp/mysftp
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
Set Chroot directory permissions
Chown root:sftp / data/sftp/mysftp
Chmod 755 / data/sftp/mysftp
After the above is done, you can log in and check.
Set the directory that can be written to
Mkdir / data/sftp/mysftp/upload
Chown sftp:sftp / data/sftp/mysftp/upload
Chmod 755 / data/sftp/mysftp/upload
Turn off selinux:
Vim / etc/selinux/config
Change the SELINUX=enforcing in the file to SELINUX=disabled, and then save
Execute:
Setenforce 0
Service sshd restart
Or
Systemctl restart sshd.service
test
Sftp sftp@127.0.0.1
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.