# Generate new ssh key (from github)
# https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
ssh-keygen -t rsa -b 4096 -C "[email protected]"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/EXAMPLE_rsa
ssh-copy-id -i ~/.ssh/EXAMPLE_rsa -o PreferredAuthentications=password -o PubkeyAuthentication=no [email protected]
Host example-alias example.com
Hostname example.com
User user
IdentityFile ~/.ssh/EXAMPLE_rsa
IdentitiesOnly yes
Note: you can use these instead of IdentitiesOnly yes
for your first connection
PreferredAuthentications=password
PubkeyAuthentication=no