What is the command to restart the ssh service?

hzc
Release: 2020-06-12 13:28:43
Original
35467 people have browsed it

What is the command to restart the ssh service?

The command to restart the ssh service is:

service sshd restart
Copy after login
systemctl restart sshd.service
Copy after login

Usage of ssh command

1. Check whether ssh has been installed

Enter "rpm -qa|grep ssh" in the command line. Under normal circumstances, the Linux system has been installed by default when installing the system. If the system If ssh has been uninstalled, you can use the command "yum -y install ssh" to install it.

2. Start and stop the ssh service

The operation of the ssh service is the same as that of other services. Use the commands "systemctl start sshd" and "systemctl stop sshd" to start and stop the ssh service. ".

3. Connect to the remote server

Enter "ssh -l root server IP" in the command line to connect to the server, or you can use "ssh root@server IP" to connect to the server.

4. Modification of ssh configuration

Enter the "vi /etc/ssh/sshd_config" command on the command line to enter the ssh configuration page and modify the parameters. .

Recommended tutorial: "linux tutorial"

The above is the detailed content of What is the command to restart the ssh service?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!