Can No Longer Login With Ec2-user After Creating A New User
What do I need to do, tax-wise, for a sudden windfall?
How to represent jealousy in a cute way?
Placement of positioning lights on A320 winglets
How can religions without a hell discourage evil-doing?
Can I get a photo of an Ancient Arrow?
Why does there seem to be an extreme lack of public trashcans in Taiwan?
What game uses dice with engraved faces, weapon symbols, double weapon symbols and object symbols?
Is fission/fusion to iron the most efficient way to convert mass to energy?
Is there a radar system monitoring the UK mainland border?
Must I use my personal social media account for work?
Parsing text written the millitext font
What do you call the action of "describing events as they happen" like sports anchors do?
Is it true that "only photographers care about noise"?
Approach sick days in feedback meeting
As easy as Three, Two, One... How fast can you go from Five to Four?
Can I attach a DC blower to intake manifold of my 150CC Yamaha FZS FI engine?
How can I find out about the game world without meta-influencing it?
Is all-caps blackletter no longer taboo?
Someone who is granted access to information but not expected to read it
Part of my house is inexplicably gone
In Pandemic, why take the extra step of eradicating a disease after you've cured it?
In The Incredibles 2, why does Screenslaver's name use a pun on something that doesn't exist in the 1950s pastiche?
Undocumented incompatibility between changes and siunitx?
Does WiFi affect the quality of images downloaded from the internet?
Can No Longer Login With Ec2-user After Creating A New User
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I've tried looking in the forums before posting this but can't find anything that really addresses my issue. Very simply, my problem is in the topic: I created a new user, afterwards, I can login with the new user, but when I try to use login as ec2-user, I get a message from the instance stating, "The client has disconnected from the server. Reason: Unable to authenticate using any of the configured authentication methods."
I've been using the .pem file I got since I created this instance, which is Amazon Linux AMI. When I created the new user, I essentially used this guide, but for completeness (since I know the devil is in the details), I can list everything that I typed.
sudo adduser exampleuser
sudo su exampleuser
mkdir .ssh (made sure I was in home dir of exampleuser)
chmod 700 .ssh
touch authorized_keys
chmod 600 authorized_keys
su
usermod -a -G ec2-user exampleuser
ssh-keygen -t rsa
cat exampleuser.pub >> ~/.ssh/authorized_keys
chgrp ec2-user /home/ec2-user
chmod g+rwx /home/ec2-user
Now, what probably screwed this up is that there is a program in the ec2-user home directory that the new user(s) will need to have access to, so I added them to the ec2-user group. I've looked in /etc/group and I see ec2-user is a member of "wheel" and exampleuser is a member of ec2-user, however when I type "groups ec2-user" it gives output of:
ec2-user: ec2-user wheel
while "groups exampleuser" gives output of:
exampleuser: exampleuser ec2-user
One thing I did have the presence of mind to do is create a root user (or set a root password), so I can become root on this system, hopefully this will allow me to fix things? I went back and looked at /home/ec2-user and saw that the .ssh directory had the wrong permissions so I did "su -l ec2-user" and redid "chmod 700 .ssh" as well as "chmod 600 authorized_keys", but it didn't make any difference. I also compared the public key in authorized_keys in the /home/ec2-user with the output from PuttyGen on my .pem file and it matches. Please tell me what I'm missing to allow me to log back in with the .pem file as ec2-user?
If there's more information that's required, please let me know and thank you. I hope that this is in the right place, my apologies if it isn't.
linux amazon-ec2 aws amazon-linux
New contributor
add a comment |
I've tried looking in the forums before posting this but can't find anything that really addresses my issue. Very simply, my problem is in the topic: I created a new user, afterwards, I can login with the new user, but when I try to use login as ec2-user, I get a message from the instance stating, "The client has disconnected from the server. Reason: Unable to authenticate using any of the configured authentication methods."
I've been using the .pem file I got since I created this instance, which is Amazon Linux AMI. When I created the new user, I essentially used this guide, but for completeness (since I know the devil is in the details), I can list everything that I typed.
sudo adduser exampleuser
sudo su exampleuser
mkdir .ssh (made sure I was in home dir of exampleuser)
chmod 700 .ssh
touch authorized_keys
chmod 600 authorized_keys
su
usermod -a -G ec2-user exampleuser
ssh-keygen -t rsa
cat exampleuser.pub >> ~/.ssh/authorized_keys
chgrp ec2-user /home/ec2-user
chmod g+rwx /home/ec2-user
Now, what probably screwed this up is that there is a program in the ec2-user home directory that the new user(s) will need to have access to, so I added them to the ec2-user group. I've looked in /etc/group and I see ec2-user is a member of "wheel" and exampleuser is a member of ec2-user, however when I type "groups ec2-user" it gives output of:
ec2-user: ec2-user wheel
while "groups exampleuser" gives output of:
exampleuser: exampleuser ec2-user
One thing I did have the presence of mind to do is create a root user (or set a root password), so I can become root on this system, hopefully this will allow me to fix things? I went back and looked at /home/ec2-user and saw that the .ssh directory had the wrong permissions so I did "su -l ec2-user" and redid "chmod 700 .ssh" as well as "chmod 600 authorized_keys", but it didn't make any difference. I also compared the public key in authorized_keys in the /home/ec2-user with the output from PuttyGen on my .pem file and it matches. Please tell me what I'm missing to allow me to log back in with the .pem file as ec2-user?
If there's more information that's required, please let me know and thank you. I hope that this is in the right place, my apologies if it isn't.
linux amazon-ec2 aws amazon-linux
New contributor
add a comment |
I've tried looking in the forums before posting this but can't find anything that really addresses my issue. Very simply, my problem is in the topic: I created a new user, afterwards, I can login with the new user, but when I try to use login as ec2-user, I get a message from the instance stating, "The client has disconnected from the server. Reason: Unable to authenticate using any of the configured authentication methods."
I've been using the .pem file I got since I created this instance, which is Amazon Linux AMI. When I created the new user, I essentially used this guide, but for completeness (since I know the devil is in the details), I can list everything that I typed.
sudo adduser exampleuser
sudo su exampleuser
mkdir .ssh (made sure I was in home dir of exampleuser)
chmod 700 .ssh
touch authorized_keys
chmod 600 authorized_keys
su
usermod -a -G ec2-user exampleuser
ssh-keygen -t rsa
cat exampleuser.pub >> ~/.ssh/authorized_keys
chgrp ec2-user /home/ec2-user
chmod g+rwx /home/ec2-user
Now, what probably screwed this up is that there is a program in the ec2-user home directory that the new user(s) will need to have access to, so I added them to the ec2-user group. I've looked in /etc/group and I see ec2-user is a member of "wheel" and exampleuser is a member of ec2-user, however when I type "groups ec2-user" it gives output of:
ec2-user: ec2-user wheel
while "groups exampleuser" gives output of:
exampleuser: exampleuser ec2-user
One thing I did have the presence of mind to do is create a root user (or set a root password), so I can become root on this system, hopefully this will allow me to fix things? I went back and looked at /home/ec2-user and saw that the .ssh directory had the wrong permissions so I did "su -l ec2-user" and redid "chmod 700 .ssh" as well as "chmod 600 authorized_keys", but it didn't make any difference. I also compared the public key in authorized_keys in the /home/ec2-user with the output from PuttyGen on my .pem file and it matches. Please tell me what I'm missing to allow me to log back in with the .pem file as ec2-user?
If there's more information that's required, please let me know and thank you. I hope that this is in the right place, my apologies if it isn't.
linux amazon-ec2 aws amazon-linux
New contributor
I've tried looking in the forums before posting this but can't find anything that really addresses my issue. Very simply, my problem is in the topic: I created a new user, afterwards, I can login with the new user, but when I try to use login as ec2-user, I get a message from the instance stating, "The client has disconnected from the server. Reason: Unable to authenticate using any of the configured authentication methods."
I've been using the .pem file I got since I created this instance, which is Amazon Linux AMI. When I created the new user, I essentially used this guide, but for completeness (since I know the devil is in the details), I can list everything that I typed.
sudo adduser exampleuser
sudo su exampleuser
mkdir .ssh (made sure I was in home dir of exampleuser)
chmod 700 .ssh
touch authorized_keys
chmod 600 authorized_keys
su
usermod -a -G ec2-user exampleuser
ssh-keygen -t rsa
cat exampleuser.pub >> ~/.ssh/authorized_keys
chgrp ec2-user /home/ec2-user
chmod g+rwx /home/ec2-user
Now, what probably screwed this up is that there is a program in the ec2-user home directory that the new user(s) will need to have access to, so I added them to the ec2-user group. I've looked in /etc/group and I see ec2-user is a member of "wheel" and exampleuser is a member of ec2-user, however when I type "groups ec2-user" it gives output of:
ec2-user: ec2-user wheel
while "groups exampleuser" gives output of:
exampleuser: exampleuser ec2-user
One thing I did have the presence of mind to do is create a root user (or set a root password), so I can become root on this system, hopefully this will allow me to fix things? I went back and looked at /home/ec2-user and saw that the .ssh directory had the wrong permissions so I did "su -l ec2-user" and redid "chmod 700 .ssh" as well as "chmod 600 authorized_keys", but it didn't make any difference. I also compared the public key in authorized_keys in the /home/ec2-user with the output from PuttyGen on my .pem file and it matches. Please tell me what I'm missing to allow me to log back in with the .pem file as ec2-user?
If there's more information that's required, please let me know and thank you. I hope that this is in the right place, my apologies if it isn't.
linux amazon-ec2 aws amazon-linux
linux amazon-ec2 aws amazon-linux
New contributor
New contributor
New contributor
asked 2 mins ago
redboxredbox
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
redbox is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f524371%2fcan-no-longer-login-with-ec2-user-after-creating-a-new-user%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
redbox is a new contributor. Be nice, and check out our Code of Conduct.
redbox is a new contributor. Be nice, and check out our Code of Conduct.
redbox is a new contributor. Be nice, and check out our Code of Conduct.
redbox is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f524371%2fcan-no-longer-login-with-ec2-user-after-creating-a-new-user%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown