You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
gftp 113<br />
% ssh -v little@sherwood.loa.taz<br />
SSH Version OpenSSH-1.2.3, protocol version 1.5.<br />
Compiled with SSL.<br />
debug: Reading configuration data /etc/ssh/ssh_config<br />
debug: Applying options for *<br />
debug: ssh_connect: getuid 1000 geteuid 1000 anon 1<br />
debug: Connecting to sherwood.loa.taz [192.168.1.1] port 22.<br />
debug: Connection established.<br />
debug: Remote protocol version 1.5, remote software version OpenSSH-<br />
1.2.3<br />
debug: Waiting for server public key.<br />
debug: Received server public key (768 bits) and host key (1024 bits).<br />
debug: Host ’littlejohn.loa.taz’ is known and matches the host key.<br />
debug: Encryption type: 3des debug: Sent encrypted session key.<br />
debug: Installing crc compensation attack detector.<br />
debug: Received encrypted confirmation.<br />
debug: RSA<br />
authentication using agent refused.<br />
debug: Doing password authentication.<br />
little@sherwood.loa.taz’s password:<br />
Se utilizzate ssh molto spesso verso determinati host, pu farvi piacere automatizzare<br />
il meccanismo di autenticazione in modo tale da non inserire ogni volta la password.<br />
Saranno necessari pochi passi. Per prima cosa occorre creare una coppia di chiavi<br />
(privata/pubblica), utilizzando il comando ssh-keygen:<br />
% ssh-keygen<br />
Generating RSA keys: ......[....]<br />
Key generation complete.<br />
Enter file in which to save the key (/home/little/.ssh/identity):<br />
/home/little/.ssh/identity<br />
Enter passphrase (empty for no passphrase):<br />
Enter same passphrase again:<br />
Your identification has been saved in /home/little/.ssh/identity.<br />
Your public key has been saved in /home/little/.ssh/identity.pub.<br />
The key fingerprint is:<br />
1024 12:34:56:78:90:ab:cd:ef:12:34:56:78:90:ab:cd:ef little@robinhood<br />
%<br />
Gli unici due input che diamo al programma sono il nome del file utilizzato per salvare<br />
le chiavi e la passphrase. L’operazione successiva consiste nel copiare il file con la chiave<br />
pubblica (/home/little/.ssh/identity.pub) sull’host remoto, appendendolo al file<br />
authorized keys (create il file se non esiste) nella directory .ssh del vostro utente. Ai<br />
prossimi login il client e il server ssh (sshd) si scambieranno le informazioni necessarie per<br />
la connessione, in maniera del tutto trasparente. L’effetto lo stesso che si ottiene con il<br />
programma rlogin, oramai caduto in disuso per motivi di sicurezza.<br />
L’algoritmo stato pensato in modo da essere sicuro e da non mandare dati relativi<br />
alla chiave privata in rete (nella manpage di ssh c’ una descrizione sommaria del<br />
metodo utilizzato), la vostra unica attenzione nei confronti di chi accede fisicamente<br />
alla macchina... purtroppo ssh non cos evoluto da riconoscere chi sta usando il vostro<br />
computer.