- 使用
ssh-keygen
生成 SSH 公钥文件 - 在~/.ssh/config 文件中加入
Host xxx HostName xxx.xx.xxx.xx User xxxx IdentityFile ~/.ssh/id_rsa
- 使用
ssh-copy-id xxx
将公钥上传到服务器
Smilie Vote is loading.
turn on
ssh-keygen
生成 SSH 公钥文件Host xxx HostName xxx.xx.xxx.xx User xxxx IdentityFile ~/.ssh/id_rsa
ssh-copy-id xxx
将公钥上传到服务器