Skip to content

Instantly share code, notes, and snippets.

@xiangjjj
Created March 16, 2017 14:02
Show Gist options
  • Save xiangjjj/80a1bc7d3827a6e891236f896fc7b8be to your computer and use it in GitHub Desktop.
Save xiangjjj/80a1bc7d3827a6e891236f896fc7b8be to your computer and use it in GitHub Desktop.
# copy private key to local machine
scp git@domain:~/path/to/privatekey/git_rsa ~/.ssh/
# setup ssh config file to simplify future connection
vim ~/.ssh/config
# enter the following commands
# this will setup all configurations to connect to the git server
Host private_git_host
HostName yourdomain.com
port 22
User git
IdentityFile ~/.ssh/git_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment