This commit is contained in:
Cat Tom 2024-07-26 02:12:48 +08:00
parent cb5848a3f8
commit ecaa3a0ecf

View File

@ -81,11 +81,9 @@ Host myvm
HostName 192.168.0.255
Port 22
User ubuntu
IdentityFile ~/.ssh/<file name> # (1)
IdentityFile ~/.ssh/<file name> # 此处填写密钥文件的绝对路径
```
1. 此处填写密钥文件的绝对路径
可为其他主机添加配置,让每台主机使用其自己的专用密钥对。 查看 SSH 配置文件获取更多高级配置选项。
获得 SSH 密钥对和配置的 SSH 配置文件后,便可快速安全地远程访问 Linux VM。 运行以下命令时SSH 从 SSH 配置文件的 Host `myvm` 块中找到所有设置并加载它们。