SSH信託の設定にCentOS

SSHにAマシンBマシン無料密着性:
実施例1:

数据库服务器:拨号VPS
 
vimのは、/ etc / ssh / sshd_config 

のPermitRootLoginはい
はいRSAAuthentication 
はいPubkeyAuthentication 

systemctl再起動sshd.service 
systemctl状態sshd.service 

systemctl有効sshd.service 

のssh-keygenは-t rsaの

SCP /root/.ssh/id_rsa.pub [email protected]:/root/id_rsa.pub 
パスワード:

B备份机器:

vimのは、/ etc / ssh / sshd_config 

のPermitRootLogin yesの
RSAAuthenticationはい
PubkeyAuthenticationはい


ます。mkdirの.ssh 
CDの.ssh 
ます。mkdir authorzied_keys 
猫id_rsa.pub >>の.ssh / authorized_keysに
はchmod 600の.ssh / authorized_keysに

SSHにAマシンBマシン無料密着性:
モード2:

A / B服务器设置:
VIMの/ etc / sshを/ sshd_configファイル

のPermitRootLogin yesの
RSAAuthenticationはい
PubkeyAuthentication yesの

1のssh-keygenは- トンRSA
 2のssh-コピー-ID -iの〜/ .ssh / id_rsa.pubルート@ 192.1681.1

おすすめ

転載: www.cnblogs.com/smileyang/p/12174029.html