From 92f6d8636f2b692404b386b65bc92f0e04db0fa0 Mon Sep 17 00:00:00 2001 From: Grant Bremer Date: Wed, 28 Aug 2013 23:06:43 -0400 Subject: [PATCH] Adding additional ssh-keygen command examples --- cheatsheets/ssh-keygen | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cheatsheets/ssh-keygen b/cheatsheets/ssh-keygen index 5d9266d..f70a3ea 100644 --- a/cheatsheets/ssh-keygen +++ b/cheatsheets/ssh-keygen @@ -4,6 +4,15 @@ ssh-keygen -t rsa # To generate a 4096-bit SSH key: ssh-keygen -t rsa -b 4096 +# To update a passphrase on a key +ssh-keygen -p -P old_passphrase -N new_passphrase -f /path/to/keyfile + +# To remove a passphrase on a key +ssh-keygen -p -P old_passphrase -N '' -f /path/to/keyfile + +# To generate a 4048 bit RSA key with a passphase and comment containing the user and hostname +ssh-keygen -t rsa -b 4048 -C "$USER@$HOSTNAME" -P passphrase + # To copy a key to a remote host: ssh-copy-id username@host