Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
3
Help us understand the problem. What is going on with this article?
@himrock922

SSHのパスフレーズを生成した後から空パスフレーズにしたい時

More than 1 year has passed since last update.

manを打ってみる

man ssh-keygen

(中略)
     -P passphrase
             Provides the (old) passphrase.

     -p      Requests changing the passphrase of a private key file instead of creating a new private key.  The program will prompt for the file containing
             the private key, for the old passphrase, and twice for the new passphrase.

-p オプションで対象の秘密鍵を指定すると、新しい鍵を生成する代わりにパスフレーズを変更してくれる模様です。
既にgithubで利用している秘密鍵なので、再登録する手間を省きたい場合はこのオプションが有用です。

$ ssh-keygen -p -f ~/.ssh/github/id_rsa                                                                                                                        
Enter old passphrase: 
Enter new passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved with the new passphrase.

変更前

% git push origin feature/markdown_editor                                                                                                    
Enter passphrase for key '*****/.ssh/github/id_rsa':
From github.com:himrock922/*****
 * branch            master     -> FETCH_HEAD
Already up to date.

変更後

% git pull origin master                                                                                                                                       
From github.com:himrock922/*****
 * branch            master     -> FETCH_HEAD
Already up to date.
3
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
himrock922
インフラ・ネットワークエンジニア(半年) -> Web開発兼インフラ・ネットワークエンジニア(2年6ヶ月) -> バックエンドエンジニアとその他諸々(1年)

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
3
Help us understand the problem. What is going on with this article?