Create a gist now

Instantly share code, notes, and snippets.

@wnoguchi /README.md
Last active Aug 29, 2015

SSH key generation Tips.

SSH key generation Tips

OpenSSH

Generate SSH key pair

ssh-keygen -t rsa -b 2048 secure-private-key

Generate Public Key from Private Key

ssh-keygen -y -f secure-private-key

putty

Convert OpenSSH(pem) key format to Putty(ppk) key format

puttygen -O private secure-private-key.pem -o secure-private-key.ppk

Convert Putty(ppk) key format to OpenSSH(pem) key format

puttygen -O private-openssh secure-private-key.ppk -o secure-private-key.pem

なお、Homebrewでインストールしたputtygenだとエラーを吐いて死ぬ模様。
以下のコマンドで解決できる。
たまにサーバ自体が死んでいて失敗するときもあるので注意。

brew reinstall putty --HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment