RSA 非对称加密算法
client ---> server
私钥 公钥
1. 客户端生成密钥对
ssh-keygen -t rsa
执行后产生的密钥对会分别追加写到当前用户家目录下的以下文件中:
.ssh/id_rsa 私钥文件
.ssh/id_rsa.pub 公钥文件
2. 把公钥追加写到服务端用户kaye的 .ssh/authorized_keys文件,eg
ssh-copy-id -i ~/.ssh/id_rsa.pub kaye@192.168.57.101
Copyright @ 2024 kayegao Powered by .NET 9.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster