Created
April 10, 2020 16:45
-
-
Save bard86/76a26f7fef00040a0542e3e3ecf63800 to your computer and use it in GitHub Desktop.
Generate ssh public and private key pair
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ssh-keygen -t rsa -C "@gmail.com" -f $HOME/.ssh/id_rsa_file |
~/.ssh/config
Host someinternalhost
HostName x.y.z.q
User someuser
IdentityFIle ~/.ssh/id_rsa_file
ForwardAgent yes
RemoteCommand ssh someinternalhost
RequestTTY force
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ssh-keygen -y -f ./id_rsa_file
-y This option will read a private OpenSSH format file and print an OpenSSH public key to stdout