Ansible

4 / 6

Please login to comment

3 Comments

 can I able to copy ssh key using public key ?

cat ~/.ssh/id_rsa.pub | ssh -i test.pem centos@publicIP "cat >> ~/.ssh/authorized_keys"

  Upvote    Share

I think you should be able to but this command does not look proper to me. 

Were you able to copy it to authorized_keys?

  Upvote    Share

Check if ur running centos or ec2-user

 

  Upvote    Share