美文网首页
CentOS 8 配置 ssh

CentOS 8 配置 ssh

作者: hhiijay | 来源:发表于2020-12-21 18:20 被阅读0次

1.安装openssh和openssh-server

  dnf -y install openssh
  dnf -y install openssh-server

2.卸载openssh和openssh-server

  dnf -y remove openssh
  dnf -y remove openssh-server

3.允许root通过 SSH 登录看,如果禁止root远程登录,那就设置为 no :

  PermitRootLogin yes

4.启动sshd服务

  service sshd start
  ps -ef | grep sshd

5.设置系统开机自启openssh-server,开启openssh-server

  systemctl enable sshd
  systemctl start sshd
  systemctl status sshd
  systemctl list-unit-files | grep sshd

6.查询centos服务ip使用登录密码测试远程链接

 ssh -p 端口 用户@centos服务ip

相关文章

网友评论

      本文标题:CentOS 8 配置 ssh

      本文链接:https://www.haomeiwen.com/subject/tlfdnktx.html