一、禁止root远程直接登录

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

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

# 不允许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

相关文章:

  • 2021-08-17
  • 2021-11-02
  • 2022-02-24
  • 2021-10-06
  • 2021-07-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-06
  • 2022-01-15
  • 2021-12-27
  • 2022-12-23
  • 2022-02-24
  • 2021-05-14
相关资源
相似解决方案