Home >Operation and Maintenance >CentOS >How to SSH to CentOS
How to SSH to CentOS
1. To connect CentOS via SSH, you first need to install the sshd service
yum install -y openssl openssh-server yum install openssh*
2. Set up auto-start And start the sshd service
systemctl enable sshd systemctl start sshd # service sshd start
3. Open port 22
firewall-cmd --zone=public --add-port=22/tcp --permanent
4. Now you can use the ssh command to connect to CentOS.
ssh root@localhost
Or use xshell, putty and other software to connect.
This article comes from the PHP Chinese website, CentOS usage tutorial column, please pay attention to this column for more related tutorials!
The above is the detailed content of How to SSH to CentOS. For more information, please follow other related articles on the PHP Chinese website!