A megoldás az, hogy RSA kulcsokat kell használni. Elöször is le kell generálni a kulcsokat. Itt egy példa, ha a kempelenröl a goliátra akarunk password nélkül belépni:
havi@kempelen:~$ ssh goliat.eik Host key not found from the list of known hosts. Are you sure you want to continue connecting (yes/no)? yes Host 'goliat.eik' added to the list of known hosts. Creating random seed file ~/.ssh/random_seed. This may take a while. havi's password: havi@goliat:~ $ mkdir .ssh havi@goliat:~ $ ssh-keygen Initializing random number generator... Generating p: ........................................++ (distance 604) Generating q: .............++ (distance 148) Computing the keys... Testing the keys... Key generation complete. Enter file in which to save the key (/export/home/havi/.ssh/identity): Enter passphrase: Enter the same passphrase again: Your identification has been saved in /export/home/havi/.ssh/identity. Your public key is: 1024 37 114945956197577926506487725331695904916039978512438680417444927358212448 53054587852373368671517501081777586273868685624331212092323183258590791011606508 87020499149045880449098193021811699459566163051801207788780233407669429302023990 82832688471471916936496768045931122108925271036951399670043935869145362245233 ha vi@goliat Your public key has been saved in /export/home/havi/.ssh/identity.pub havi@goliat:~ $ scp .ssh/identity.pub havi@kempelen.inf: Host key not found from the list of known hosts. Are you sure you want to continue connecting (yes/no)? yes Host 'kempelen.inf' added to the list of known hosts. havi's password: havi@goliat:~ $ ssh kempelen.inf -l havi havi's password: havi@kempelen:~$ cat identity.pub >> .ssh/authorized_keys havi@kempelen:~$ exit
Ebben az esetben vissza kell lépni a kempelenre, de mindenhol a teljes gépnevet adjuk meg!
havi@goliat:~ $ ssh kempelen.inf.bme.hu Enter passphrase for RSA key 'havi@goliat': havi@kempelen:~$ ssh goliat.eik.bme.hu havi's password: havi@goliat:~ $ echo 'kempelen.inf.bme.hu havi' >> .shosts havi@goliat:~ $ exit havi@kempelen:~$ exit havi@goliat:~ $ exit
Ezek után müködnie kell...
Konfigurálni a ~/.ssh/config fájlban lehet. Példa:
Host *.hszk.bme.hu User s5096nem Host *.mmt.bme.hu User s5096nem Host *.c3.hu Compression yes Compressionlevel 7