生成SSH密钥对
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
~/.ssh/id_rsa(私钥) ~/.ssh/id_rsa.pub(公钥)
生成Putty私钥
对于Putty需要使用自己的私钥, 所以需要加载id_rsa, 生成ppk格式的私钥
导入id_rsa, 生成id_rsa.ppk
服务器设置
将id_rsa.pub内容添加到服务器以下文件: ~/.ssh/authorized_keys
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
~/.ssh/id_rsa(私钥) ~/.ssh/id_rsa.pub(公钥)
对于Putty需要使用自己的私钥, 所以需要加载id_rsa, 生成ppk格式的私钥
导入id_rsa, 生成id_rsa.ppk
将id_rsa.pub内容添加到服务器以下文件: ~/.ssh/authorized_keys