ssh-keygen -t rsa -b 4096ssh-keygen -t rsa -b 4096 -C "your@email.com" ssh-copy-id user@server
To set up SSH agent to avoid retyping passwords, you can do two things:
Add an ssh config file (will be absent by default)
vi ~/.ssh/config
Host [hostname]
User [username]
IdentityFile ~/.ssh/[key]
Add the key when starting bash:
echo "ssh-add ~/.ssh/id_rsa &>/dev/null" >> .bashrc