参数说明:
local_name: 当前电脑用户
server_name: 服务端用户
server_ip: 服务端ip
一、生成秘钥对(生成路径: /Users/local_name/.ssh)
ssh-keygen -t rsa
id_rsa:私钥
id_rsa.pub: 公钥
二、上传公钥
ssh-copy-id server_name@server_ip
输入登录密码,提示
Number of key(s) added
成功!!
local_name: 当前电脑用户
server_name: 服务端用户
server_ip: 服务端ip
ssh-keygen -t rsa
id_rsa:私钥
id_rsa.pub: 公钥
ssh-copy-id server_name@server_ip
输入登录密码,提示
Number of key(s) added
成功!!
本文标题:阿里云免密登录
本文链接:https://www.haomeiwen.com/subject/gyelxdtx.html
网友评论