Permission denied (publickey). while ssh code example
Example 1: permission denied (publickey password)
cat ~/.ssh/id_rsa.pub | ssh <user>@<hostname> 'cat >> .ssh/authorized_keys && echo "Key copied"'
Example 2: scp permission denied (publickey) but ssh works
scp -i ~/.ssh/my-private-key.pem file.txt [email protected]:/home/bitnami/