I want to connect to a Linux Database Server on a private subnet through a Linux SSH Bastion Server situated on a public subnet. I also want to create a tunnel to port 3306.
When I attempt to create the SSH connection from the Bastion server, I receive "Permission Denied (publickey)." message.
ssh -L 10.0.0.10:22:10.0.1.10:22 email@example.com
Here's the debug output where it fails:
> debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug1: Trying private key: /root/.ssh/id_rsa debug1: Trying private key: /root/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey).
The correct Public key is already on DB Server, so I think I need to enter the private RSA key somewhere. Where do I enter the private key? Also are there any sshd config changes required to create the tunnel on 3306?