Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
misc:ssh:cmds [2021/02/17 14:02] jsmisc:ssh:cmds [2021/02/17 14:13] (current) js
Line 1: Line 1:
 ====== Puttygen Examples ====== ====== Puttygen Examples ======
  
-== Create key ==+=== Create key ===
 <code bash>puttygen -t rsa -b 2048 -C "commenct for that key" -o putty-private-keyfile.ppk</code> <code bash>puttygen -t rsa -b 2048 -C "commenct for that key" -o putty-private-keyfile.ppk</code>
  
-== Extract the public key ==+=== Extract the public key ===
 <code bash>puttygen -L putty-private-keyfile.ppk</code> <code bash>puttygen -L putty-private-keyfile.ppk</code>
 <code>ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEAiUG9w5O6MTK/U2J/23ledKqxaYuVTVt5eRXehWvNyF5BOT2/XURROx7bkj88CvGGPdkXcLf/stNXKe3M5UBtNffZ3bBylr+xb1bjVb9kIcVaQ3d5WqfP/2Ewf5OqMgJuykeAtBbcssddddhgDU7XxBq/AXrTc3NODNHtMDW73uD7pjaWTYXVIFftBdvM8HkO3UFjl7PtOZQm1XNGgAuLnKLIY1zTDKapPIod7rUOVRwDOhZimXdibAdddddNpEFIO9zL2+cdAgLKPJbuYyQfdsdafasYDP66/xbhUXwLrmKXATGDEXnR84SgzT48Qn31EwrTWmx+Vuj3qDDhUhQ2OAxXYpjc/Q2nUJKHqJn6ePTxO3IJHX1Ge7NfHtHaeNdPJqHIwjziaJhrvXTXbKNurQ3dKltgTKgGMWAn59XMSWMMpbhZmBjDv1/9pdgNO+FyEE2YamfWZXKzroEUmJIO/GONTU9X2X9DVXKjGdsafd1K3KAZ9yOGEXq+F8gWOdC6NnllqbGkCUQWvCvTkQHvbkuqNOdj5g0YEi2VyKmAyy9l6CTupQlqrAahoeMxvLO+WTl4MFa+p3HE8= example key</code> <code>ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAgEAiUG9w5O6MTK/U2J/23ledKqxaYuVTVt5eRXehWvNyF5BOT2/XURROx7bkj88CvGGPdkXcLf/stNXKe3M5UBtNffZ3bBylr+xb1bjVb9kIcVaQ3d5WqfP/2Ewf5OqMgJuykeAtBbcssddddhgDU7XxBq/AXrTc3NODNHtMDW73uD7pjaWTYXVIFftBdvM8HkO3UFjl7PtOZQm1XNGgAuLnKLIY1zTDKapPIod7rUOVRwDOhZimXdibAdddddNpEFIO9zL2+cdAgLKPJbuYyQfdsdafasYDP66/xbhUXwLrmKXATGDEXnR84SgzT48Qn31EwrTWmx+Vuj3qDDhUhQ2OAxXYpjc/Q2nUJKHqJn6ePTxO3IJHX1Ge7NfHtHaeNdPJqHIwjziaJhrvXTXbKNurQ3dKltgTKgGMWAn59XMSWMMpbhZmBjDv1/9pdgNO+FyEE2YamfWZXKzroEUmJIO/GONTU9X2X9DVXKjGdsafd1K3KAZ9yOGEXq+F8gWOdC6NnllqbGkCUQWvCvTkQHvbkuqNOdj5g0YEi2VyKmAyy9l6CTupQlqrAahoeMxvLO+WTl4MFa+p3HE8= example key</code>
 +
 +=== Export OpenSSH Key ===
 +<code bash>puttygen putty-private-keyfile.ppk -O private-openssh -o openssh-private-keyfile</code>
 +
 +=== -O options ===
 +-O output-type = specifies what to output. By default, the private key is output. 
 +
 +  * **private** = save the private key in the proprietary PuTTY key format as a .ppk file.
 +  * **fingerprint** (or -l) = outputs the fingerprint of the key
 +  * **public** (or -p) = save the public key corresponding to the private key. For SSH2 keys, the public key will be output in the format specified by RFC 4716. This format is supported by, e.g., Tectia SSH. Keys in that format look like this:
 +     <WRAP center round box 60%>
 +''---- BEGIN SSH2 PUBLIC KEY ---- Comment: "user@example.com" AAAAB3NzaC1yc2EAAAABIwAsdfasdfEA1on8gxCGJJWSRT4uOrR13mUaUk0hRf4RzxSZ1zRb YYFw8pfGesIFoEuVth4HKyF8k1y4mRUafdssdfasdfe4WWZSXXcPff+EHtWshahu3WzBdnGxm5Xoi89zcE= 
 +\\
 +    ---- END SSH2 PUBLIC KEY ----''
 +</WRAP>
 +
 +  * **public-openssh** (or -L) = save the public key only, in OpenSSH's proprietary format. The format is also supported by Tectia SSH. like this:
 +
 +    ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTbmdsfawer23lzdHAyNTYAAABBBN+Mh3U/3We4VYtV1QmWUFIzFLTUe32324D/QGtCRGAZn8bxX9KlCrrWISIjSYAwCajIEGSPEZwPNMBoK8XD8Q= test@example.com
 +
 +  * **private-openssh** = converts the private key to OpenSSH's format. This can only be used for SSH2 keys.
 +  * **private-sshcom** = converts the private key to the format used by Tectia SSH.
 +  * **private-openssh** = coverts the private key to the format used by OpenSSH. This format is also supported by Tectia SSH.
 +
 +