Table of Contents

Openssh

Tips and tricks

Changing or removing a key passphrase

Originally taken from http://www.cyberciti.biz/faq/howto-ssh-changing-passphrase/#comment-37419.

ssh-keygen -f <filename> -p

This will prompt you for the original passphrase (if set), display the key's comment, then ask you to set a new passphrase. You can leave the new passphrase blank to remove the key encryption. This operation changes the key on the file in-place, so make a duplicate of the key file beforehand if you want to keep the original copy.