SSH key managment for many users
Hi,
I need to assign ssh key pairs to the EC2 instances for multiple IAM users. So what i want to have:
IAM users [user1,user2,user3]
, out of them [user1,user2]
should have separate (each IAM user should have its own user in VM) SSH access to the [VM-1,VM-2]
EC2 instances, and the [user3]
should have access only to the [VM-3]
instance.
Do i need to generate ssh key pairs, create users inside the EC2 instance, assign permissions for those users - manually, and then also manually add those SSH pub keys in the EC2 instances? Or AWS has service that can do it automatically for me?
Joann
You can do that. But it's additional work that you have to do. However, check out Systems Manager Session Manager as it does a lot of the heavy lifting for you.
NVM, found this https://stackoverflow.com/questions/24409095/create-an-ec2-instance-with-multiple-key-pairs , apparently i will need to manually ( or in my case in docker-image ) add the pub keys.
Relevant questions
SSH key managment for many users
Accepted AnswerJoann Babakasked 4 days agoUnable to access SSH for EC-2
pbciasked 6 days agossh key-pair anomaly on copying AMI
AWS-User-1977007asked 4 months agoEnter passphrase for key '/home/ec2-user/.ssh/lab-3-key - Cloud9, pcluster, FDS
Accepted AnswerAmazon-User-25asked 4 months agoEd25519 SSH public key support
AWS-User-1231313asked 3 months agoBest practice of using Keypair, in EC2
Boopalanasked 3 months agoRoles - changing tag depending on user assuming the role
Accepted AnswerJoann Babakasked 7 days agoCannot SSH to ec2 instances
PlanetNineasked 9 months agoSSH key managment for multiple accounts
Accepted AnswerJoann Babakasked 7 days agoHow long does the one-time use SSH public key expire?
Accepted Answerzxkaneasked 3 years ago
Okay, by default
session manager
not using the SSH, so i did this https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-enable-ssh-connections.html , then i was able to get the SSH connection, but as i understood itsSSH session
oversystem manager session
, so i have more questions 1) How i can automate adding ssh keys into the instances 2) Is there possibility to use pureSSH sessions
?