sshスプーンの生成と追加

1423 ワード

        
git@android:~$ ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/git/.ssh/id_rsa): 
Created directory '/home/git/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/git/.ssh/id_rsa.
Your public key has been saved in /home/git/.ssh/id_rsa.pub.
The key fingerprint is:
7e:fd:c6:0a:d3:37:53:bd:e9:ac:fd:b2:31:ba:ea:0d git@android
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|                 |
|                .|
|        S       o|
|       .   o   .o|
|        . E o.*o |
|         . = +B= |
|         .o.==+*o|
+-----------------+

                   

git@android:~$ cat /tmp/yuanwei.pub >> .ssh/authorized_keys

有効かどうかを確認
yuanwei@android:/home/gitolite/repositories$ ssh [email protected]
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-26-generic x86_64)

 * Documentation:  https://help.ubuntu.com/


The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

git@android:~$ exit
  
Connection to 192.168.2.128 closed.
yuanwei@android:/home/gitolite/repositories$