Skip to content

SSH

Basic commands

To start a ssh agent

sh
eval `ssh-agent`

To generate public and private ssh keys

sh
ssh-keygen

OR

sh
ssh-keygen -t rsa

Load a private ssh key to establish a secure connection

Replace ~/.ssh/github with your private ssh key path

sh
ssh-add -k ~/.ssh/github

Permissions 0777 for <ssh-private-key> are too open

sh
chmod 400 <ssh-private-key>

List all identities

sh
 ssh-add -l

Remove all identities

sh
ssh-add -D