![]() ![]() If we do this by hand, for the first question we just need to hit enter, and for the second, type y and press enter. If you don't care about the RSA name and just want to overwrite it, we need to answer these two questions automatically:Įnter file in which to save the key: /example/path/.ssh/id_rsa already exists. home/klashxx/.ssh/id_rsa already exists.ĪTTENTION: If you don't care about the RSA file name and certainly want to overwrite the previous one, check the instructions below point four.Ģ) Now we need to answer " y" automatically to the overwrite question (let's use a here-string for that job): $ ssh-keygen -t rsa -f ~/.ssh/id_rsa /dev/null 2>&1Īn alternative path to overwrite the previous RSA file (no -f flag needed) Step by step explanation $ ssh-keygen -t rsaĮnter file in which to save the key (/home/klashxx/.ssh/id_rsa):ġ) To avoid entering the key use -f: $ ssh-keygen -t rsa -f ~/.ssh/id_rsa f filename specifies the filename of the key file. Or, under a bash like shell, If you certainly want to overwrite the previous one, use just a here-string to feed the command with all the need input: ssh-keygen -q -t rsa -N '' /dev/null 2>&1įrom ssh-keygen man page: -N new_passphrase provides the new passphrase. Use -f to enter the path (in this example id_rsa) plus a here-string to answer yes to the following question: ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa /dev/null 2>&1 Use the -N flag (void string for this example): We need to accomplish two steps automatically:Įnter a passphrase.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |