ubuntu authorized_keys code example
Example 1: ssh add key to authorized_keys
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Example 2: ubuntu add public key to server
ssh-copy-id -i ~/.ssh/id_rsa.pub user@server