a easy way to connect your pc over ssh to your github account
#############################################################
- checking if there is any ssh key already connected to your PC :
ls -al ~/.ssh (# Lists the files in your .ssh directory, if they exist. if exists then go to the number 4)
2 .generating a new ssh key :
$ ssh-keygen -t ed25519 -C "[email protected]"
or ,
$ ssh-keygen -t rsa -b 4096 -C "[email protected]"
3.adding the new key to your PC :
eval "$(ssh-agent -s)" $ ssh-add ~/.ssh/id_ed25519 or ssh-add ~/.ssh/id_rsa
after running this command you can run echo $
- adding a key to your github :
$ clip < ~/.ssh/id_ed25519.pub
(#paste it in the box)
5 .testing the ssh connection : $ ssh -vT [email protected]
list all the keys added to your ssh agent -
eval "$(ssh-agent -s)" ssh-add -l