Skip to content

Instantly share code, notes, and snippets.

@programmerShinobi
Last active October 24, 2024 15:05
Show Gist options
  • Save programmerShinobi/53af91ef087899ff161d5f27bfba30ba to your computer and use it in GitHub Desktop.
Save programmerShinobi/53af91ef087899ff161d5f27bfba30ba to your computer and use it in GitHub Desktop.
Test GitHub SSH Connection

Test GitHub SSH Connection

Follow the steps below to test your SSH connection to GitHub.

1. Attempt to SSH to GitHub:

2. If you receive the following output:

ssh: connect to host github.com port 22: Connection timed out

Then, proceed to edit your SSH configuration.

3. Open the SSH config file:

$ nano ~/.ssh/config

4. Enter the following code and save the file:

Host github.com
Hostname ssh.github.com
Port 443

5. Try to SSH to GitHub again:

6. If you see the following result, the connection is successful:

The authenticity of host '[ssh.github.com]:443 ([20.205.243.160]:443)' can't be established.
ED25519 key fingerprint is SHA256:<hash-code>.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:1: [hashed name]
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[ssh.github.com]:443' (ED25519) to the list of known hosts.
Hi programmerShinobi! You've successfully authenticated, but GitHub does not provide shell access.

Source:

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