Peer-to-Peer-Gleichstellungskonfiguration von SSH

Suppose that there are 2 linux servers nodeA and nodeB, Both they are in same subnet.

we need to configure ssh peer-to-peer equality to meet the requirement of copying

a mass of files from nodeA to nodeB without password verification

nodeA:

es ist – Nutzer

mkdir ~/.ssh

chmod 700 ~/.ssh/

ssh-keygen -t rsa

ssh-keygen -t dsa

nodeB:

es ist – Nutzer

mkdir ~/.ssh

chmod 700 ~/.ssh/

ssh-keygen -t rsa

ssh-keygen -t dsa

nodeA:

cat ~/.ssh/id_rsa.pub >>~ / .ssh / autorisierte_Tasten

cat ~/.ssh/id_dsa.pub >>~ / .ssh / autorisierte_Tasten

ssh nodeB cat ~/.ssh/id_rsa.pub >> ~ / .ssh / autorisierte_Tasten

ssh nodeB cat ~/.ssh/id_dsa.pub >> ~ / .ssh / autorisierte_Tasten

scp ~/.ssh/authorized_keys nodeB:~ / .ssh / autorisierte_Tasten

Then, login nodeA and nodeB through user. and login each other.

after this ,Peer-to-peer equality of ssh configuration will take effect.

Another way to copy public key from local to file

authorized_keys of remote server by commandssh-copy

ssh-copy-id user@server ssh-copy-id -i ~/.ssh/id_rsa.pubuser@remote_ip -p port


Hinterlasse eine Antwort