Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 841
  • Last Modified:

sshd has failed, please contact the sysadmin


I'm currently having an issue connecting to my server via SFTP. The connection is working fine, however the client hangs during the authentication. I'm connecting to the server via SFTP using WinSCP. I have never had any issues until today. My local firewall is turned off. I don't have any antivirus or any other application that could be interfering with the connection. The SFTP connection was working fine until today. I also tried disabling IPtables in the remote server, but that did not help at all. The server has CentOS x86_64 and cPanel installed. I can see the sftp-server process being created during the connection. I'm getting the following information in /var/log/messages:

sftp-server[666]: session opened for local user x from [x.x.x.x]

I tried restarting SSHD via cPanel, however when I do that I get the following msg:

Waiting for sshd to restart...............finished.
sshd (/usr/sbin/sshd) running as root with PID 12670
sshd has failed, please contact the sysadmin.

After doing this, the SSH process works fine. I can connect to the SSH daemon without any problems. However the SFTP connection is not working as I stated above.

I'd appreciate any help with this.

If you need more information, please don't hesitate to ask me.

  • 5
  • 5
1 Solution
Might be a hanging sftp sub process... have you tried scp?
If that works, I'd check

> ps xa | grep sftp

after stopping  the sshd. If it shows a process, kill it.
If that doesn't work, you will have to reboot the machine.
_paulieAuthor Commented:

Thanks for your reply.

I tried that, the ps process is only returning the grep process.

Is rebooting the machine really necessary?

Do you by any chance have any idea of what the cause of the problem could be?

Thanks for your time.
_paulieAuthor Commented:

I also tried connecting via SCP using WinSCP as client, but that did not work. WinSCP is getting stuck during the authentication.

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Well, you could ltrace the sshd process...
_paulieAuthor Commented:
Unfortunately, I've never done that before. Would you be kind to explain how it works? I'll follow your instructions carefully. Thank you!
Check if SElinux is enforcing by typing

> sestatus

Check, if you can connect locally to the sshd.

> ssh user@localhost

If you get no response use the verbose mode

> ssh -v user@localhost

Let's see if we can discern something from the output.
_paulieAuthor Commented:
SELinux status is disabled.

I tried connecting to the ssh daemon, but I'm not receiving any response. Here is the output:

OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to localhost [] port 22

That's all it says.

Thank you!
Are you sure, the sshd is running?

Check via

> ps xa | grep sshd

If it only shows the grep or nothing at all, try to start it and check again.
If it doesn't work, please start sshd manually

> /usr/sbin/sshd -v

Does it tell you any reasons for aborting?
_paulieAuthor Commented:
Yes, sshd is running. When I try to connect to the sshd with -v it only prints the text i wrote above. If you wait 60 seconds, you get a time out error. Now the SFTP server seems to be working fine. I have no idea why it is working, but it's working. I did not restart sshd. I'm very confused.
That is indeed confusing ;)
Might be a network issue... timeouts...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now