linshengqian

CentOS 7.X 开启ssh服务

  1. 检测是否安装 openssh-server ,输入命令yum list installed | grep openssh-server

没有任何输出,表示没有安装
输入安装命令yum install openssh-server

  1. 使用 vim 打开 sshd 服务配置文件,输入命令 vim /etc/ssh/sshd_config将第17,19,20行前的#号去掉

  2. 开启 sshd 服务,输入命令 sudo service sshd start
    检测 sshd服务是否开启 ps -e | grep sshd

    检测 22 号端口是否开启 netstat -an | grep 22

  • 将 sshd 服务设置为开机自启动systemctl enable sshd.service

  • 检测是否开启systemctl list-unit-files | grep sshd

  1. 查看 Centos8 ip 命令ifconfig

发现ip为:..150.129

  1. 在主机中使用ping命令,测试是否可以连通Centos服务器

  2. 使用SSH工具登录服务器

分类:

技术点:

相关文章:

  • 2022-01-05
  • 2021-08-03
  • 2022-12-23
  • 2021-04-11
  • 2021-06-18
  • 2021-11-23
猜你喜欢
  • 2022-02-10
  • 2021-06-22
  • 2021-05-16
  • 2022-12-23
  • 2021-12-08
相关资源
相似解决方案