About Linux FAQ

Browse More FAQs:

Advertisements

OpenSSH Change a Passphrase With ssh-keygen command

Posted by Vivek Gite [Last updated: February 4, 2008]

Q. How do I change OpenSSH passphrase for one of my private keys under Linux?

A. Use ssh-keygen command to generates, change manages and converts authentication keys for ssh. Generally, you should the see following files at $HOME/.ssh (~/.ssh directory i.e. /home/you/.ssh/)

=> id_dsa : DSA authentication identity of the user

=> id_dsa.pub : DSA public key for authentication

=> id_rsa : RSA authentication identity of the user

=> id_rsa.pub : RSA public key for authentication

Changing a Passphrase with ssh-keygen

The -p option 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. Use -f {filename} option to specifies the filename of the key file. For example, change directory to .ssh:
$ cd .ssh
To change RSA passphrase, enter:
$ ssh-keygen -f id_rsa -p
To change DSA passphrase, enter:
$ ssh-keygen -f id_dsa -p

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. Stu Says:

    If something relies on the private key will it still work the same way? I mean a SSL certificate for example…

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.