Rocky Linux

Rocky Linux中怎么使用SSH远程登录

小亿
294
2024-03-27 16:21:38
栏目: 智能运维

要在Rocky Linux中使用SSH远程登录,您需要先确保SSH服务器已经安装并运行。您可以按照以下步骤进行操作:

  1. 安装SSH服务器:
sudo dnf install openssh-server
  1. 启动SSH服务器并设置开机自启动:
sudo systemctl start sshd
sudo systemctl enable sshd
  1. 确保防火墙允许SSH连接:
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --reload
  1. 查找Rocky Linux的IP地址:
ip a
  1. 在另一台计算机上,使用SSH命令连接到Rocky Linux:
ssh username@ip_address

(将“username”替换为您的Rocky Linux用户名,“ip_address”替换为Rocky Linux的IP地址)

  1. 输入密码登录即可。

0
看了该问题的人还看了