[ssh] ssh key passphrase 재설정

Inhye Jeong·2020년 8월 31일
0

ssh key의 passphrase 그냥 enter를 눌러 대충 만든 경우 업데이트가 필요할 때 아래와 같이 진행한다.

1. 우선 현재 passphrase확인

  • 아래 command로 현재 passphrase를 확인한다.

    $ ssh-keygen -y -f ~/.ssh/id_rsa_file
    Enter passphrase:

  • -y
    : This option will read a private OpenSSH format file and print an OpenSSH public key to stdout.

2. passphrase 업데이트

  • 아래 command 입력 후, 원하는 passpharase 입력, 다시 입력

    $ ssh-keygen -p -f ~/.ssh/id_rsa_file
    Key has comment '이메일@아이디.주소'
    Enter new passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved with the new 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.

3. 업데이트한 passpharse 맞는지 확인

  • 1번 command 다시 입력하고, 업데이트한 passphrase 입력
profile
Frontend Engineer in @KakaoStyle

0개의 댓글