Skip to content

This is an all-in-one script or guide on how to access SSH with or without Putty to GitHub.

Notifications You must be signed in to change notification settings

DioChuks/AIO_SSH-Putty-GitHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

How to use

Download or copy the script into a file.

Give execute permissions:

chmod +x spg.sh
  • Run the script:
./spg.sh

Note: This script automates the process where possible and provides clear instructions for manual steps like handling the private key in PuTTY format. The user will be prompted to complete those steps manually and return to the script once they’ve done so.

Manual Instructions

  • Connecting SSH to GitHub via Putty or any other clients

If you're using cPanel, enable remote SSH access by either contacting the hosting support or toggling the access permission.

Once that is done, generate new valid key pairs (this includes a public and private key) and add a passphrase to it.

ssh-keygen -t ed25519 -C "[email protected]"

Open the contents of the public key and copy it, then go to GitHub account settings > SSH and GPG keys > click New SSH key and follow the rest instructions from there.

After that, go back to cPanel, and authorize the key and download the private key as Putty file format or as original file format.

If downloaded as Putty file format, open Putty, head to SSH > Auth > Credentials, then select the path where it's saved on your local machine.

If not downloaded as Putty file format, then open Puttygen and click on Conversions > Import key, select the file, and click Save as private key.

Once that is done, setup host address and port, make sure to remember password if any, then click open and connect once or accept.

Once shell is opened, enter password if prompted, then turn on SSH agent with this command:

eval "$(ssh-agent -s)"

Then add the public key (this is due to wrong SSH key been used) with this command:

ssh-add ~/.ssh/NAME_OF_KEY_AS_SAVED_WHEN_CREATED

Then run the command for testing with GitHub:

If connected, the response will be:

Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access.

Make sure Key Algorithms are types of SHA-2, RSA, ECDSA (not allowed is SHA-1 and older).

Note: Contributions are accepted.

This markdown file provides clear instructions on how to connect SSH to GitHub via Putty or any other clients. It includes steps for both cPanel users and those not using cPanel, ensuring comprehensive guidance for users of different systems. Additionally, it emphasizes the importance of using secure key algorithms and encourages contributions.

About

This is an all-in-one script or guide on how to access SSH with or without Putty to GitHub.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages