Howto / Linux
Sincronizzare directory con Rsync over SSH
Author: Tafaz
Visits: 3082
Date: 18.10.2008
in questo caso l'utente già esiste ma se il comando lanciato non dovesse dare nessun output è necessario creare l'utente e assegnargli una password con
root@Storage:~$ useradd -m -s/bin/bash tafaz
root@Storage:~$ passwd tafaz
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
tafaz@Storage:~$ cat /etc/passwd |grep tafaz
tafaz:x:1001:1001::/home/tafaz:/bin/bash
ora sul pc client genero una coppia di chiavi pubblica/privata da usare in seguito con ssh per evitare la richiesta della password
tafaz@ubuntu:~$ ssh-keygen -t dsa -b 1024 -f /home/tafaz/.ssh/ssh-keys
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/tafaz/.ssh/ssh-keys.
Your public key has been saved in /home/tafaz/.ssh/ssh-keys.pub.
The key fingerprint is:
ca:1a:2e:67:f6:aa:bd:51:2b:90:c3:d1:aa:fb:83:1f tafaz@Nefertum
tafaz@ubuntu:~$
quando ssh-keygen richiede la password per la chiave la lasciamo vuota.
ora dobbiamo copiare la chiave pubblica nella macchina server per poi aggiungerla nella lista delle chiavi autorizzare che si trova in /home/`nomeutente`/.ssh
tafaz@ubuntu:~$ scp /home/tafaz/.ssh/ssh-keys.pub tafaz@192.168.1.200:/home/tafaz/.ssh/ssh-keys.pub
tafaz@192.168.1.200's password:
ssh-keys.pub 100% 395 0.2KB/s 00:00
tafaz@ubuntu:~$
Author: Tafaz
Visits: 3082
Date: 18.10.2008
in questo caso l'utente già esiste ma se il comando lanciato non dovesse dare nessun output è necessario creare l'utente e assegnargli una password con
root@Storage:~$ useradd -m -s/bin/bash tafaz
root@Storage:~$ passwd tafaz
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
tafaz@Storage:~$ cat /etc/passwd |grep tafaz
tafaz:x:1001:1001::/home/tafaz:/bin/bash
ora sul pc client genero una coppia di chiavi pubblica/privata da usare in seguito con ssh per evitare la richiesta della password
tafaz@ubuntu:~$ ssh-keygen -t dsa -b 1024 -f /home/tafaz/.ssh/ssh-keys
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/tafaz/.ssh/ssh-keys.
Your public key has been saved in /home/tafaz/.ssh/ssh-keys.pub.
The key fingerprint is:
ca:1a:2e:67:f6:aa:bd:51:2b:90:c3:d1:aa:fb:83:1f tafaz@Nefertum
tafaz@ubuntu:~$
quando ssh-keygen richiede la password per la chiave la lasciamo vuota.
ora dobbiamo copiare la chiave pubblica nella macchina server per poi aggiungerla nella lista delle chiavi autorizzare che si trova in /home/`nomeutente`/.ssh
tafaz@ubuntu:~$ scp /home/tafaz/.ssh/ssh-keys.pub tafaz@192.168.1.200:/home/tafaz/.ssh/ssh-keys.pub
tafaz@192.168.1.200's password:
ssh-keys.pub 100% 395 0.2KB/s 00:00
tafaz@ubuntu:~$
Se vuoi discutere con noi su questo articolo o comunque vuoi porci delle domande usa il nostro Forum

