CentOS7中如何安装和配置OpenSSH服务器
要在CentOS7中安装和配置OpenSSH服务器,可以依照以下步骤进行操作:
sudo yum install openssh-server
sudo systemctl start sshd
sudo systemctl enable sshd
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
Port 22 #设置SSH端口,默许为22
PermitRootLogin no #制止root用户登录
PasswordAuthentication yes #允许密码验证登录
sudo systemctl reload sshd
现在,OpenSSH服务器已安装和配置好了,您可使用SSH客户端连接到CentOS7服务器。
TOP