0
点赞
收藏
分享

微信扫一扫

A-Ansible-ssh配置

Ad大成 2023-02-23 阅读 88
SSH密钥配置

yum -y install openssh-clients

ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): ##回车
Enter passphrase (empty for no passphrase): ##回车
Enter same passphrase again: ##回车

把对应公钥同步到两台node主机上

ssh-copy-id -i ~/.ssh/id_rsa 172.24.77.242

ssh-copy-id -i ~/.ssh/id_rsa 172.24.77.243

Number of key(s) added: 1

Now try logging into the machine, with: "ssh '172.24.77.242'"
and check to make sure that only the key(s) you wanted were added.

举报

相关推荐

0 条评论