GestioneSSHCertificati: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 1: | Riga 1: | ||
Obiettivo: configurare l'accesso SSH senza password da manager01.gazzi.local verso altre macchine Linux tramite chiavi SSH. | |||
1. **Generazione chiavi SSH (sul nodo manager01)** | |||
ssh-keygen -t rsa -b 4096 -C "manager01" -f ~/.ssh/id_rsa | |||
- Non inserire una passphrase se vuoi accesso automatico. | |||
- Il file pubblico sarà ~/.ssh/id_rsa.pub | |||
2. **Distribuzione della chiave pubblica agli host remoti** | |||
Per ogni macchina remota: | |||
ssh-copy-id utente@host_remoto | |||
Oppure, manualmente: | |||
cat ~/.ssh/id_rsa.pub | ssh utente@host_remoto 'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh' | |||
3. **Verifica connessione** | |||
ssh-keygen -t | ssh utente@host_remoto | ||
-> non dovrebbe richiedere la password | |||
4. **Automazione (script `setup_ssh_keys.sh`)** | |||
Lo script automatizza i punti 1 e 2. | |||
Per ogni macchina | |||
ssh-copy-id utente@host_remoto | |||
ssh | |||
ssh utente@host_remoto | |||
. | |||
* | |||
* | |||
Versione delle 19:42, 29 apr 2025
Obiettivo: configurare l'accesso SSH senza password da manager01.gazzi.local verso altre macchine Linux tramite chiavi SSH. 1. **Generazione chiavi SSH (sul nodo manager01)** ssh-keygen -t rsa -b 4096 -C "manager01" -f ~/.ssh/id_rsa - Non inserire una passphrase se vuoi accesso automatico. - Il file pubblico sarà ~/.ssh/id_rsa.pub 2. **Distribuzione della chiave pubblica agli host remoti** Per ogni macchina remota: ssh-copy-id utente@host_remoto Oppure, manualmente: cat ~/.ssh/id_rsa.pub | ssh utente@host_remoto 'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && chmod 700 ~/.ssh' 3. **Verifica connessione** ssh utente@host_remoto -> non dovrebbe richiedere la password 4. **Automazione (script `setup_ssh_keys.sh`)** Lo script automatizza i punti 1 e 2.