ssh public key denied code example
Example 1: ssh error permission denied (publickey)
sudo service ssh restart
Example 2: ssh error permission denied (publickey)
sudo nano /etc/ssh/sshd_config
PermitRootLogin prohibit-password to PermitRootLogin yes
PasswordAuthentication no to PasswordAuthentication yes
Example 3: scp permission denied (publickey) but ssh works
scp -i ~/.ssh/my-private-key.pem file.txt [email protected]:/home/bitnami/