0

Can I, and in that case how can I, change the password of an SSH identity file without having to generate a new key and setting up it all over again?

lindhe
  • 4,236
  • 3
  • 21
  • 35

1 Answers1

2

Identity file = private key file? From the manual, (man ssh-keygen):

ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]

The -p switch changes the passphrase of a private key file with a prompt, whereas the -P switch specifies the old password on the command line. Use one of these in interactive mode depending on the encryption algorithm and file name you have used.

ssh-keygen -p -f ~/.ssh/id_dsa
ssh-keygen -p -f ~/.ssh/id_rsa
Christopher
  • 15,911