Skip to content

Instantly share code, notes, and snippets.

@kaito834
Created May 4, 2015 07:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaito834/dac8905c6c4a544608d2 to your computer and use it in GitHub Desktop.
Save kaito834/dac8905c6c4a544608d2 to your computer and use it in GitHub Desktop.
Generate SSH public/private keys on Windows.

File Formats for SSH Keys

There have been three file formats for SSH keys. According to PuTTY document, "SSH-2 private keys have no standard format."

Tools

References

Appendix 1. Tips for SSH

###Convert SECSH(RFC4716) format to others This is quoted from http://qiita.com/marcie001/items/47a23cfeed00db783d39 (in Japanese).

$ ssh-keygen -i -f id_rsa.pub >> ~/.ssh/authorized_keys

###Identify a size of SSH key This is quoted from http://d.hatena.ne.jp/hnw/20140705 (in Japanese).

$ ssh-keygen -l -f $HOME/.ssh/id_rsa.pub

Use multiple SSH keys

This is quoted from http://d.hatena.ne.jp/MIZUNO/20080705/1215238138 (in Japanese).

$ ssh -i ~/.ssh/id_rsa.hoge hoge@fuga.com

The ssh command searchs SSH keys automatically if the SSH keys are set in ~/.ssh/config.

IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_rsa.hoge
IdentityFile ~/.ssh/id_rsa.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment