My Sites


Tuesday, November 29, 2016

SSH key-based authentication related errors and fixes

Could not open a connection to your authentication agent.
eval `ssh-agent -s`
ssh-add


Add private key permanently with ssh-add on Ubuntu.
ssh-add keyname (This is the temporaray fix)
Permanant Fix


Add keys in ~/.ssh/config file:
  IdentityFile ~/.ssh/gitHubKey
  IdentityFile ~/.ssh/id_rsa_buhlServer 


Permissions 0777 for '/Users/username/.ssh/id_rsa' are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored.

chmod 400 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa


How To Configure SSH Key-Based Authentication on a Linux Server
https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server

Generate a SSH key pair by typing: ssh-keygen
Copy the contents of your ~/.ssh/id_rsa.pub key into a file in the remote account's home ~/.ssh directory called
authorized_keys.

Default ssh key is id_rsa


RSA authentication with openssh
http://cects.com/openssh-rsa-authentication-for-windows-and-linux/