0
votes

I've been trying to set up ssh with my github account and on following the guide on https://help.github.com/articles/generating-ssh-keys/ and on running the command listed there : I get the following error

ssh-keygen -t rsa -b 4096 -C "[email protected]"
illegal option -- C
Usage: ssh-keygen [options] [key1 key2 ...]

Where `options` are:
 -b nnn         Specify key strength in bits (e.g. 1024)
 -t dsa | rsa   Choose the key type.
 -c comment     Provide the comment.
 -e file        Edit the comment/passphrase of the key.
 -p passphrase  Provide passphrase.
 -P             Assume empty passphrase.
 -?
 -h             Print this help text.
 -q             Suppress the progress indicator.
 -1             Convert a SSH 1.x key.
 -i file        Load and display information on `file'.
 -D file        Derive the public key from the private key 'file'.
 -B number      The number base for displaying key information (default 10).
 -V             Print ssh-keygen version number.
 -r file        Stir data from file to random pool.
 -F file        Dump fingerprint of file.

I'm running Ubuntu 14.04

1

1 Answers

0
votes

From the output of your command, I speculate you should replace -C with -c (lowercase). So try again with -c:

ssh-keygen -t rsa -b 4096 -c "[email protected]"

From the docs, -C is supposed to provide a new comment:

-C comment

Provides the new comment.

So, since your output says Provide the comment, I guess it should work with -c.


As alternative, you can try using ssh-keygen -t rsa.


It turns out that the ssh-keygen was actually overridden:

I figured it out, for some reason i has another ssh-keygen binary in my /usr/local/bin, so when i used it was using that one instead of the one that comes with ubuntu in /usr/bin Deleting the extra binaries and then reinstalling Openssh-server and openssl fixed everything. Thanks!