Generate SSH key

ssh-keygen -t rsa -b 4096 -f ~/.ssh/<ROLE>_rsa -C "Comment goes here"
This is just a default ssh-keygen command. Prompts for a password that you can use to secure the keys more and uses a higher bit value than the default along with naming the key something other than id_rsa for better file identification.

0
By: krizzo
2015-01-11 17:52:21

These Might Interest You

  • Permit to generate a password for userPassword in ldap. Use ?slappasswd -g? to generate a random passowrd. Show Sample Output


    -1
    slpappasswd
    evolix · 2011-10-13 14:46:03 0
  • Generate a changelog between the v1 and v2 tags Show Sample Output


    2
    git log --no-merges --format="%an: %s" v1..v2
    blakegardner · 2013-06-17 21:06:45 0
  • This command is similar to the alternate, except with head(1), you can pick as many passwords as you wish to generate by changing the number of lines you wish to preview. Show Sample Output


    2
    strings /dev/urandom | tr -cd '[:alnum:]' | fold -w 30 | head -n 1
    atoponce · 2014-12-11 06:21:51 0
  • I use this to generate a playlist with all the podcasts I listen to. Ordered from most recent to older. Show Sample Output


    3
    find . -type f -print0 | xargs -r0 stat -c %Y\ %n | sort -rn | gawk '{sub(/.\//,"",$2); print $2}' > /tmp/playlist.m3u
    microft · 2009-03-04 16:41:02 1

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: