Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What are the recommended arguments to ssh-keygen for generating a secure ssh keypair these days? The default appears to be 2048 bit RSA, good enough?

I'm using OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

2048 bit RSA is concidered safe until 2030. If that is good enough for you you can generate your keys with the following command:

ssh-keygen -t rsa -f $HOME/.ssh/rsa_key_file_2048

If you require a key that is safe beyond 2030 a longer key is recommended (3072 bit should suffice). You can define the key size with the -b argument:

ssh-keygen -t rsa -b 3072 -f $HOME/.ssh/rsa_key_file_3072

The output of the commands are two files, the private key as defined by the -f argument and the public key with the extension .pub.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.