Skip to content

Instantly share code, notes, and snippets.

@bard86
Created April 10, 2020 16:45
Show Gist options
  • Save bard86/76a26f7fef00040a0542e3e3ecf63800 to your computer and use it in GitHub Desktop.
Save bard86/76a26f7fef00040a0542e3e3ecf63800 to your computer and use it in GitHub Desktop.
Generate ssh public and private key pair
#!/bin/bash
ssh-keygen -t rsa -C "@gmail.com" -f $HOME/.ssh/id_rsa_file
@bard86
Copy link
Author

bard86 commented Apr 18, 2020

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

@bard86
Copy link
Author

bard86 commented Apr 18, 2020

~/.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