Alberto Garcia

Compartició de claus SSH amb la pasarel·la

El primer pass serà, compartir des de les nostres màquines, a la passerella, per fer-ho o farem amb la següent comanda, això ho farem des de totes les màquines dels companys del grup.

ssh-copy-id usuari_passarella@ip_passarella

Resultat de la comanda

[08:39:28][~][agarcia@agarcia]-$ ssh-copy-id grup3@172.25.205.12
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
grup3@172.25.205.12's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'grup3@172.25.205.12'"
and check to make sure that only the key(s) you wanted were added.

[08:54:11][~][agarcia@agarcia]-$ 

Ara una vegada ja compartida des de les nostres màquines, el que ens faltarà serà des de la passerella fer la compartició a les nostres màquines, per fer-ho ser aigual que l’anterior comanda però canviant l’usuari i la IP, i això ho faré a tots els usuaris dels membres del grup.

ssh-copy-id usuari_membre@ip_membre

Resultat de la comanda

grup3@debian:~$ ssh-copy-id agarcia@192.168.100.2
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/grup3/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
agarcia@192.168.100.2's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'agarcia@192.168.100.2'"
and check to make sure that only the key(s) you wanted were added.