use private key to generate public key ssh keygen code example Example 1: gen ssh key ssh-keygen -t rsa -b 4096 Example 2: ssh keygen ssh-keygen -t rsa -b 8192