一、禁止root远程直接登录

创建普通用户,并设置密码

useradd test   #新建账户
passwd test    #设置密码

不允许root远程直接登录

vim /etc/ssh/sshd_config

找到 # PermitRootLogin yes   
修改为 PermitRootLogin no

重启 sshd 服务

systemctl restart sshd.service

二、修改ssh的端口

修改 ssh 端口

vi /etc/ssh/sshd_config

找到 #Port 22  
修改为 Port 36322

重启 sshd 服务

systemctl restart sshd.service

相关文章:

  • 2022-12-23
  • 2021-08-31
  • 2022-01-15
  • 2022-12-23
  • 2021-06-22
  • 2021-12-21
  • 2022-12-23
猜你喜欢
  • 2021-06-02
  • 2021-06-11
  • 2021-09-21
  • 2022-02-07
  • 2022-01-07
  • 2022-12-23
  • 2021-11-28
相关资源
相似解决方案