简体   繁体   中英

Is the AWS ec2 private key specific to a user in the ec2 instance

I have an ec2 instance. I have a private putty key. Currently I am logging in as root user. So I created a new user, But unable to login directly as new user using this putty key. Is this putty key specific to a instance user. Please help.

Yes. You need to add your public key to the user authorized_keys file in order to use your key with that user.

Your putty key does have a public portion that is stored on the server you want to access. If it works for the root user, its is in the authorized_keys file for the root user. Find the file here /root/.ssh/authorized_keys . The file will be in /home/username/.ssh/authorized_keys for all other users. If its not there you can create it, but pay attention to permissions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM