SSH免密配置
1. 在三个节点生成秘钥
cd ~/.ssh
ssh-keygen -t rsa
2.合并三个节点的密码
cat id_rsa.pub >> authorized_keys
ssh cat ~/.ssh/id_rsa.pub>> authorized_keys
ssh cat ~/.ssh/id_rsa.pub>> authorized_keys
3 分发authorized_keys和known_hosts到三个节点
scp authorized_keys :/home/postgres/.ssh/.
scp known_hosts :/home/postgres/.ssh/.
scp authorized_keys :/home/postgres/.ssh/.
scp known_hosts :/home/postgres/.ssh/.
4. 设置权限
chmod 700 ~/.ssh/
chmod 600 authorized_keys
5.SSH登录过程如果出现问题可查看安全日志
/var/log/secure
常见问题
Jan 18 18:12:00 test-postgre-sql-2 sshd[12378]: Authentication refused: bad ownership or modes for file /home/postgres/.ssh/authorized_keys
相关推荐
hulao 2020-06-13
WanKaShing 2020-11-12
projava 2020-11-14
airfish000 2020-09-11
tryfind 2020-09-14
yegen00 2020-09-10
kkaazz 2020-09-03
风语者 2020-09-02
BraveWangDev 2020-08-19
lichuanlong00 2020-08-15
gsl 2020-08-15
pandaphinex 2020-08-09
yhuihon 2020-08-09
CheNorton 2020-08-02
xiangqiao 2020-07-28
hpujsj 2020-07-26
hpujsj 2020-07-26
sshong 2020-07-19
BraveWangDev 2020-07-19