APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Centos ssh failure


Some material is very old and may be incorrect today

© June 2009 Anthony Lawrence

I have a customer who uses a fairly new Centos server to function as an ssh gateway to his ancient SCO box. On Friday he told me that no one could ssh in.

My first thought was the router, but it seemed to be operating correctly. I had him log in at the console and try an "ssh localhost". That complained about syntax errors in ssh_config at a few lines. I had him read me the offending lines; there was nothing wrong.

I needed to login myself and didn't want to drive to Boston. Not only didn't I want to waste the time, but this customer has an impossible parking situation. He actually has a good sized parking lot, but because it was too big for what his employees needed, he rented spaces to a used car dealer! Whenever I have to go there, I cringe because I can almost never find a parking spot anywhere near them.

So, I reprogrammed the router to let my ip in through telnet and had him turn it on. Normally telnetd wouldn't even be installed on a Linux box; I don't even remember why it was here, but having it available certainly saved some time and trouble.

After logging in I confirmed that there really was nothing wrong with the ssh_config. I next looked at /var/log/secure and found entries like this:

Jun  8 07:31:59 e-smith sshd[24987]: Accepted password for rmtxyz 
from ::ffff:127.0.0.1 port 53387 ssh2
Jun  8 07:31:59 e-smith sshd[24989]: pam_unix(sshd:session): session 
opened for user rmtxyz by (uid=1000)
Jun  8 07:31:59 e-smith sshd[24989]: pam_loginuid(sshd:session): 
set_loginuid failed opening loginuid
Jun  8 07:31:59 e-smith sshd[24989]: pam_loginuid(sshd:session): 
set_loginuid failed 
Jun  8 07:31:59 e-smith sshd[24989]: fatal: PAM session setup failed[14]: 
Cannot make/remove an entry for the specified session
Jun  8 07:31:59 e-smith sshd[24987]: syslogin_perform_logout: 
logout() returned an error

That looks like a PAM problem, but I couldn't see anything wrong with PAM either. I scouted around the web a bit and found references to similar problems from a few years back. These looked like they might have come from a bad update to ssh at that time, but how could that be affecting us now? That didn't make sense.

Nevertheless, I figured that would only take a minute to try, so I did a "yum update openssh" and to my complete surprise ssh logins started working again.

I have no idea what this was, but it's fixed for now. I took the telnet config out of the router and all is back to normalcy.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Centos ssh failure

5 comments


Inexpensive and informative Apple related e-books:

Take Control of IOS 11

Take Control of Pages

Digital Sharing Crash Course

Take Control of iCloud, Fifth Edition

Take Control of Preview





More Articles by © Anthony Lawrence







Mon Jun 8 15:49:47 2009: 6467   Ralph

gravatar
What irritates me is the appearance of version 6 IP numbers in the log file. I usually see version 4 here.
Maybe the update has fixed an inconsistency of ssh with IPv6? Did the update actually overwrite any system files?





Mon Jun 8 16:38:50 2009: 6468   TonyLawrence

gravatar
Yes, it definitely updated ssh. I didn't even notice those addresses..



Mon Jun 8 17:09:20 2009: 6469   TonyLawrence

gravatar
And after the update, it's back to ipv4 addresses in the log.. hmm...



Mon Jun 8 17:10:54 2009: 6470   TonyLawrence

gravatar
But that's an old bug too: (link)







Mon Jun 8 18:51:17 2009: 6471   TonyLawrence

gravatar
I'm wondering if Centos somehow managed to push out some old code.. and if so, what else may bite me in the nether cheeks?

------------------------


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





A C program is like a fast dance on a newly waxed dance floor by people carrying razors. (Waldi Ravens)




Linux posts

Troubleshooting posts


This post tagged:

Linux

Networking

SSH

Security

Troubleshooting



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode