I am trying to build AMI and while ssh using ec2-user. It runs fine. but when i try to use ssm-user as ssh_username it fails with handshake issue.
I have already attached the instance profile with which i was able to login to ec2 on console with session manager.
Could you please suggest what should i check.