Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Last active May 12, 2020 05:24
Show Gist options
  • Save zulhfreelancer/54297b693233887be78bf061d7500cf9 to your computer and use it in GitHub Desktop.
Save zulhfreelancer/54297b693233887be78bf061d7500cf9 to your computer and use it in GitHub Desktop.
Test SSH connection to a specific GitHub repository

If you just added a SSH key into a repository Deploy keys section, this command might be useful for you to test and verify if the SSH connection works between your machine and GitHub server.

$ ssh -i /path/to/ssh/private-key -T git@github.com

For example:

$ ssh -i /home/zulh/.ssh/my-id_rsa -T git@github.com
Warning: Permanently added the RSA host key for IP address 'x.x.x.x' to the list of known hosts.
Hi zulh/awesome-repo! You've successfully authenticated, but GitHub does not provide shell access.

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment