网站运营
位置:首页>> 网站运营>> 使用ssh-keygen,实现免密码登陆linux的方法

使用ssh-keygen,实现免密码登陆linux的方法

作者:jingxian  发布时间:2023-03-24 01:56:58 

标签:linux,ssh,keygen

1  本机创建ssh密钥

ssh-keygen

2  拷贝公共密钥到“被登陆机”输入密码,

scp  id_rsa.pub  root@10.35.0.35:~/.ssh/id_rsa.pub

3  ssh到“被登陆机”把公共密钥输入 “authorized_keys”(如果多个机器都需要使用rsa密钥认证登录此机器的话,将这些机器产生的公钥全部输入到)“authorized_keys”

cat  id_rsa.pub >> authorized_keys

4  这样就实现无密码登陆

ssh root@10.35.0.35

0
投稿

猜你喜欢

手机版 网站运营 asp之家 www.aspxhome.com