generate ssh key to connect to server code example Example: add public key to server ssh-copy-id -i ~/.ssh/mykey.pub user@host