add authorized key 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: insert key file ssh linux
sudo chmod 400 [key file]
sudo ssh -i [key file] [username]@[ip]