首页 > 其他分享 >配置ssh等效连接(ssh-copy-id)

配置ssh等效连接(ssh-copy-id)

时间:2023-01-09 14:24:57浏览次数:39  
标签:postgres 192.168 1.103 ssh copy id

环境:
OS:Centos 7
机器A:192.168.1.100
机器B:192.168.1.102
机器C:192.168.1.103

目的:配置以上3台机器免密等效连接


1.机器A:192.168.1.100上操作
su - postgres
ssh-keygen -t rsa
ssh-copy-id -i [email protected]
ssh-copy-id -i [email protected]
ssh-copy-id -i [email protected]

ssh 192.168.1.100 date
ssh 192.168.1.102 date
ssh 192.168.1.103 date

 

2.机器B:192.168.1.102上操作
su - postgres
ssh-keygen -t rsa
ssh-copy-id -i [email protected]
ssh-copy-id -i [email protected]
ssh-copy-id -i [email protected]

ssh 192.168.1.102 date
ssh 192.168.1.100 date
ssh 192.168.1.103 date

 

3.机器C:192.168.1.103上操作
su - postgres
ssh-keygen -t rsa
ssh-copy-id -i [email protected]
ssh-copy-id -i [email protected]
ssh-copy-id -i [email protected]

ssh 192.168.1.103 date
ssh 192.168.1.102 date
ssh 192.168.1.100 date

 

-- The End --

标签:postgres,192.168,1.103,ssh,copy,id
From: https://www.cnblogs.com/hxlasky/p/17036903.html

相关文章