sshgitlabssh-keygen

What does the `-o` flag do in `ssh-keygen`?


In gitlab's documentation on how to generate ssh key: they suggest to use the -o argument. However, this argument does not seem to appear in the manual of ssh-keygen. No error is thrown so it is acceptable. I am wondering what does it do?


Solution

  • The ssh-keygen "-o" option currently does nothing. It's accepted by ssh-keygen for compatibility, but ignored.

    It used to cause ssh-keygen to save the key in a different key format, but that key format is now the default behavior.

    It looks like this change was made for OpenSSH 7.8 in 2018. It's not unreasonable in 2021 for someone to be following github's instructions using an older version of ssh-keygen in which the option does something useful.