ssh配置免密登陆

从服务器A免密登陆到服务器B

1、在服务器A生成密钥(执行后按4次回车键)
 ssh-keygen
 
2、将A公钥拷贝到B服务器
 ssh-copy-id user@IP
 
 
注:执行步骤1会在A服务器 .ssh/目录下生成id_rsa(私钥),id_rsa.pub(公钥)
  执行步骤2会在B服务器 .ssh/目录下生成authorized_keys
posted @ 2022-06-08 16:13  opscool  阅读(58)  评论(0)    收藏  举报