Fedora Core 500の技
Valid XHTML 1.0!
正当なCSSです!

TOP > Linux > Fedoraの技 > 201-300 > 202

秘密鍵のパスフレーズを変更するには

秘密鍵を利用するときに確認されるパスフレーズを変更する時はssh-keygenコマンドで"-p"オプションを利用します。下記の例では"-f"オプションでringoユーザの秘密鍵を指定しています。

$ ssh-keygen -p -f ~/.ssh/ring_key
Enter old passphrase: 古いパスフレーズを入力する
Key has comment '.ssh/ring_key'
Enter new passphrase (empty for no passphrase): 新しいパスフレーズを入力する
Enter same passphrase again:
Your identification has been saved with the new passphrase.

"-P"と"-N"オプションを使いパスフレーズを直接指定して変更することも出来ます。下記の例は古いパスフレーズが"It is fine day."、新しいパスフレーズに"How are you?"を指定したものです。

$ ssh-keygen -p -P "It is fine day." -N "How are you?" -f ~/.ssh/ring_key
Key has comment '.ssh/ring_key'
Your identification has been saved with the new passphrase.

2005-12-03 作成