重启ssh服务出现Redirecting to /bin/systemctl restart sshd.service

转自:https://blog.csdn.net/caijunfen/article/details/70599138

CentOs 重启ssh服务的命令如下:

# service sshd restart

出现:Redirecting to /bin/systemctl restart sshd.service

 以下转自:Redirecting to /bin/systemctl restart sshd.service

1. 查看 sshd 服务是否启动:

???704.jpg

看到上述信息就可以确定是启动了。

2. 如果没有启动,则需要启动该服务:


  1. systemctl start sshd.service

3. 重启 sshd 服务:


  1. systemctl restart sshd.service

4. 设置服务开启自启:


  1. systemctl enable sshd.service
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章