当前位置:网站首页>SFTP cannot connect to the server # yyds dry goods inventory #

SFTP cannot connect to the server # yyds dry goods inventory #

2022-07-05 02:40:00 wangzx_ mm

​1、 to glance at ssh Whether the operation is normal

      
      
systemctl status sshd
service sshd status
  • 1.
  • 2.

2、 Take a look at the configuration file

      
      
vi /etc/ssh/sshd_config
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
-- -- -Subsystem There is # If No .


-- -- Please comment out the following sentences , Conflict with the above
Subsystem sftp internal-sftp-server
UsePAM yes
Match User test
ChrootDirectory /opt/download/
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.

3、 Restart the service

      
      
/etc/init.d/sshd reload perhaps service sshd restart
  • 1.

4、 Check the connection status

      
      
netstat
  • 1.

5、 Check whether the firewall is on , Let's take a look again. The firewall policy is not set

      
      
systemctl status firewalld
service iptable status

iptables -L -n
  • 1.
  • 2.
  • 3.
  • 4.

6、 Check the vsftpd Whether the service is normal

      
      
systemctl status vsftpd
  • 1.

7、 to glance at sftp If there is something wrong ​

      
      
systemctl status sftp
service sftp status
  • 1.
  • 2.







原网站

版权声明
本文为[wangzx_ mm]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140908089031.html