SSH - creazione key e accesso diretto
- adminAB76
- Autore della discussione
- Amministratore
Less
Di più
- Messaggi: 4
11 Anni 3 Mesi fa - 9 Anni 2 Settimane fa #41
da adminAB76
SSH - creazione key e accesso diretto è stato creato da adminAB76
Generare la chiave SENZA PASSWORD
invio chiave al server secondario che riceve la connessione:
Test di connessione senza password:
Stringa per attivazione gui con il server X:
To enable SSH login for a root user on Debian Linux system you need to first configure SSH server.
Open /etc/ssh/sshd_config and change the following line:
Code:
SERVER1:~# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): INVIO
Enter passphrase (empty for no passphrase): INVIO
Enter same passphrase again: INVIO
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
e9:25:14:c1:bf:00:e1:fd:98:db:a2:c5:f0:3b:12:30 root@SERVER1
The key's randomart image is:
+--[ RSA 2048]----+
| .o... |
| .o.. |
| ..E.. |
| . ..o.o . |
| S .co + |
| . o. 3= o |
| . 2 . B .|
| + + |
| 76 . . |
+-----------------+
invio chiave al server secondario che riceve la connessione:
Code:
SERVER1:~# ssh-copy-id -i /root/.ssh/id_rsa.pub root@SERVER2
The authenticity of host '192.168.0.52 (192.168.0.52)' can't be established.
RSA key fingerprint is bf:28:8b:2a:b7:1a:73:c3:76:bc:cf:45:2c:11:c4:de.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.52' (RSA) to the list of known hosts.
root@192.168.0.52's password:
Now try logging into the machine, with "ssh 'root@192.168.0.52'", and check in:
~/.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
Test di connessione senza password:
Code:
SERVER1:~# ssh root@192.168.0.52
Linux SERVER2 3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Aug 6 16:38:28 2013 from SERVER1.ascodom.local
SERVER2:~#
Stringa per attivazione gui con il server X:
Code:
ssh -X -l username host
To enable SSH login for a root user on Debian Linux system you need to first configure SSH server.
Open /etc/ssh/sshd_config and change the following line:
Code:
FROM: PermitRootLogin without-password
TO: PermitRootLogin yes
Ultima Modifica 9 Anni 2 Settimane fa da adminAB76.
Si prega Accesso a partecipare alla conversazione.