I have a centos server that recently needed a fsck repair on it's main hard drive. After fixing a bunch of inode issues (booting from a system rescue disk), the box booted clean. Most of the services are running fine, however the sshd service immediately core dumps when I try to start it.
Running gdb /usr/sbin/sshd core.xxx, the last line before it dumps the core is:
Reading symbols from /lib/libnss_files.so.2 ... (no debugging available) Loaded symbols for /lib/libnss_files.so.2 Core was generated by `/usr/sbin/sshd'. Program terminated with signal 11, Segmentation fault #0 0x00a0dffc in PEM_read_bio () from /lib/libcrpto.so.6
I've tried reinstalling sshd by (yum reinstall openssh), but no luck.
***** Update ***** I was able to get it working. In case it helps anyone else, here was the critical clue:
rpm -Va openssl prints out:
prelink: /lib/libcrypto.so.0.9.8e: prelinked file was modified S.?...... /lib/libcrypto.so.0.9.8e
Obviously something is messed up with libcrypto (the gdb core dump also pointed to libcrypto). Looking at /lib/libcrypto* I figured out what version it was running. There is no way that I know of to have yum force reinstall the dependencies, so in the end, I had to copy the libcrypto.so.0.9.8e from another working server (using wget because scp did not work). After replacing that file, all was well.