Friday, 9 October 2015

About SSH Key

SSH keys are a way to identify trusted computers, without involving passwords

Lets make our Computer Trusted
1. To check for existing SSH keys on computer
ls -al ~/.ssh

2. If there is no an existing public & private key pair listed (e.g. id_rsa.pub & id_rsa) then Generate SSH key to connect GitHub
     1) # This command creates a new ssh key, using provided
         ssh-keygen -t rsa -b 4096 -c "pradnya@sodelsolutions.com"
     2) since default settings are as they are, when prompted to "Enter a file in    which to save the key", just press Enter to continue
     3) You'll be asked to enter a passphrase
     4) you'll be given the id, of your SSH key

3. Add your SSH key to your account
     1) Copy the SSH key to your clipboard
         1] sudo apt-get install xclip
             #Downloads & installs xclip
         2] xclip -sel clip < ~/.ssh/id_rsa.pub
            #Copies the contents of the id_rsa.pub file to your clipboard
     2) Add the copied key to GitHub
         Settings -> SSH Key -> Add SSH Key -> Add Title -> Add Key to Key Field   -> Add Key -> Confirm Action by entering GitHub Password