I am trying to enable SSHing from one EC2 instance to another without a key.
$ ssh ubuntu@slave
gives me a permsission denied (public key)
Whereas $ ssh -i aws-key.pem ubuntu@slave
works correctly as expected.
Since I want to enable ssh less logging, I did the following
1) Generated a key in the master instance like
$ ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa_master_to_slave
2) Added that key to the list of authorized keys of the same master instance
$ cat ~/.ssh/id_dsa_master_to_slave.pub >> ~/.ssh/authorized_keys
3) SCPed the public key file to the slave instance.
$ scp -i aws_key.pem /home/ubuntu/.ssh/id_dsa_master_to_slave.pub ubuntu@slave:~/
4) Added the SCP-ed file to the list of authorized keys in the slave instance as well.
$ cat id_dsa_master_to_slave.pub >> ~/.ssh/authorized_keys
Still when I try to SSH without proving the pem file, I get
Permission Denied (Public Key)
Am I missing out something?