SSH access keys where are they located, how to sync them?

P

postcd

Guest
Hello,

i would like to setup password-sess access between 3 servers and allow quick addition of additional servers into password less group.

I want to ask how to do it so when i add new server i dont need to run difficult command on each of the server?


----
im using redhat CentOS only, please where (which file) is located ssh key info
a) on local server that is allowing connection
b) on remote server which is allowed to connect
?
Thank You
 


they are in your home directory:
Code:
/home/username/.ssh

http://wiki.centos.org/HowTos/Network/SecuringSSH#head-9c5717fe7f9bb26332c9d67571200f8c1e4324bc

There should be a command to copy the keys:
Code:
ssh-copy-id remote-server.org
if not you have to do it manually:
Code:
 scp ~/.ssh/id_ecdsa.pub [email protected]
Code:
 ssh [email protected]
[email protected]'s password:
mkdir ~/.ssh
chmod 700 ~/.ssh
cat ~/id_ecdsa.pub >> ~/.ssh/authorized_keys
rm ~/id_ecdsa.pub
chmod 600 ~/.ssh/authorized_keys
 
You can also use X/Windows copy/paste to place the public key on the remote server, but using ssh-copy-id as stated above is sooooooooo much easier.

And just to clarify - the ssh keys are located in the same directory on both the client and the server. Different userids on each isn't an issue - the keys are in $HOME/.ssh/ but in the client there will be both the private and public key and on the remote server there will be at least 2 files, authorized_keys and known_hosts
 

Staff online

Members online


Top