Trying to connect using CentOS7
I deployed a couple of EC2 instances using terraform and now and trying to log in.
aws2 ec2-instance-connect send-ssh-public-key --instance-id i-0788274a4861154d44 --availability-zone us-east-2 --instance-os-user ec2-user --ssh-public-key file:/aws_ssh/my_rsa_key.pub
Parameter validation failed:
Invalid length for parameter SSHPublicKey, value: 42, valid range: 256-inf
I tried this command as well
ssh-keygen -t rsa -f my_rsa_key -b 1024
Still gives the same error.
I am new to this so as much help as you can give.