Forrest logo
back to the ssh-keygen tool

ssh:tldr:bba77

ssh: Change the password of a key.
$ ssh-keygen -p -f ${~--ssh-filename}
try on your machine

The command ssh-keygen -p -f ${~--ssh-filename} is used to change the passphrase of an SSH private key.

Here is the breakdown of the command:

  • ssh-keygen is the command-line utility for generating, managing, and converting SSH key pairs.
  • -p is an option that specifies that we want to change the passphrase of the key.
  • -f is another option that specifies the filename or location of the private key we want to modify.
  • ${~--ssh-filename} is a variable that contains the filename or location of the private key. The exact value of this variable depends on the context, as it is not provided in the command itself.

By running this command and providing the proper value for ${~--ssh-filename}, you will be prompted to enter the current passphrase (if any) and then to enter and confirm the new passphrase for the SSH private key.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ssh-keygen tool