SSH 生成密钥及指定私钥文件连接
# 密钥生成
# 生成密钥
使用 -t 选项指定生成的密钥类型
ssh-keygen -t rsa
使用 -b 选项指定生成的密钥位数,如生成 4096 位的 RSA 密钥
ssh-keygen -t rsa -b 4096
# 生成适用于 GitHub 的密钥
使用 -C 选项设置注释文字,如邮箱地址
ssh-keygen -C "Github 邮箱"
# 将公钥添加到远程服务器
# 添加到远程服务器
查看公钥
cat ~/.ssh/id_rsa.pub
登录到远程服务器
ssh username@example.com
编辑 authori
more...








