LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Locked Out of SSH Due to Invalid SSHD Config (https://www.linuxquestions.org/questions/linux-security-4/locked-out-of-ssh-due-to-invalid-sshd-config-4175482910/)

DeltaCharlieBravo 10-31-2013 07:15 AM

Locked Out of SSH Due to Invalid SSHD Config
 
Hi folks,

I'm relatively new to Linux and made a mistake when editing the sshd config on a server. The server had something set for AllowGroups which was a group that I was not part of. I thought I could easily solve this by adding in a line for AllowUsers and added my user into it.

However, I can see now that I erred in my ways as this does not set things up to allow people SSH access who are part of the group OR the users, instead it only allows somebody who is both a member of the group AND the user listed.


I'm guessing there is nothing I can do about this now but figured I would ask anyways.


Fortunately this is a physical server so once I'm back onsite I believe I should be able to login via the console without having to rely on SSH and fix the issue. However, I'm wondering if there is anything I can do in the short term before I'm back onsite there.


If anybody can assist it would be greatly appreciated.



Key Takeaway: Don't log out of an SSH session before verifying the changes made will work. Lesson learned.

TobiSGD 10-31-2013 07:31 AM

I think you answered this yourself, you will have to change the settings from a local console.
FWIW, you are not the first one that learns this lesson the hard way (happened at least to me also) and you won't be the last person with that problem.

DeltaCharlieBravo 10-31-2013 08:06 AM

That was what I expected but figured I would check in any case.

At least this isn't a headless server without access to the console, that would have made things much more frustrating...this is just an inconvenience!


Thanks for your reply.

DeltaCharlieBravo 11-01-2013 01:08 PM

Fixed this today via the console. Fortunate this was an option!


All times are GMT -5. The time now is 02:14 PM.