Home >Operation and Maintenance >Linux Operation and Maintenance >What is the command to restart the ssh service?
The command to restart the ssh service is:
service sshd restart
systemctl restart sshd.service
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!