ssh
2021-10-16 本文已影响0人
陈海辉
步骤
ls -al ~/.ssh # 查看是否 生成过 id_rsa id_rsa.pub
ssh-keygen -t rsa -C "邮箱" -f 生成目录 # 生成密钥, 会让输入密码, 可直接回车
-t 密钥类型(默认是 rsa)
-C 注释文字(如邮箱)
-f 指定密钥文件存储文件名
cat ~/.ssh/id_rsa # 查看私钥
cat ~/.ssh/id_rsa.pub # 查看公钥
ls -al ~/.ssh # 查看是否 生成过 id_rsa id_rsa.pub
ssh-keygen -t rsa -C "邮箱" -f 生成目录 # 生成密钥, 会让输入密码, 可直接回车
-t 密钥类型(默认是 rsa)
-C 注释文字(如邮箱)
-f 指定密钥文件存储文件名
cat ~/.ssh/id_rsa # 查看私钥
cat ~/.ssh/id_rsa.pub # 查看公钥