54hsh

一、SeLinux配置(永久关闭)

sed -i \'s/SELINUX=enforcing/SELINUX=disabled/g\' /etc/selinux/config
setenforce 0

二、关闭防火墙(以centos7为例)

systemctl stop firewalld

systemctl disable firewalld

三、确认关闭了selinux和防火墙

修改ssh远程端口,vim /etc/ssh/sshd_config(按i进入编辑模式,改完后ESC>>shift+:>>wq)

修改后重启ssh服务,service sshd restart

四、将防火墙重新开启,systemctl restart firewalld.service

并且授权远程访问端口2020,参考https://www.cnblogs.com/54hsh/p/13355413.html

分类:

技术点:

相关文章:

  • 2022-02-18
  • 2022-12-23
  • 2021-04-16
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2021-12-02
猜你喜欢
  • 2021-05-07
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-04-04
  • 2022-01-07
  • 2021-05-16
相关资源
相似解决方案