カスタム検索
|
Tweet |
|
|
Modified: 9 January 2004
サーバー側で、クライアントPCからのユーザ認証のための公開鍵・秘密鍵を作成します。
作成後、認証データを送るための公開鍵("authorized_keys")を、公開鍵("identity.pub")リネームして作ります。
> /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tomo/.ssh/id_rsa): /home/tomo/.ssh/identity
Enter passphrase (empty for no passphrase): ************
Enter same passphrase again: ************
Your identification has been saved in /home/tomo/.ssh/identity.
Your public key has been saved in /home/tomo/.ssh/identity.pub.
The key fingerprint is:
9c:27:7a:b2:7c:df:4c:fd:f1:95:d6:bf:d4:0b:e6:03 tomo@freebsd120.tomo.ac
> cd .ssh
> mv identity.pub authorized_keys
> chmod 600 authorized_keys
>秘密鍵の"identity"は、FD等で、クライアントのPCにコピーして使います。
最後に、"identity"と、"identity.pub"は、削除します。