CentOS7开启ssh服务

安装完CentOS7后,为了便于copy命令,总是要使用ssh软件的,譬如XShell或是Secure CRT。

  • 在命令行切换到root用户。通过 rpm -qa | grep ssh 查看有没有安装ssh服务。

  

 

  • 如果没有安装,就使用 yum install openssh-server 来安装。
  • 修改ssh配置文件, vim /etc/ssh/sshd_config 

  

  

 

  • 在CentOS7里,systemctl start sshd 开启ssh服务
  • 查看ssh的进程是否开启,ps -e | grep sshd

  

  • 将ssh服务添加到开机自启,systemctl enable sshd.service

 

posted @ 2020-04-01 23:08  富贵树先生  阅读(1072)  评论(0编辑  收藏  举报