Solved

sshd has failed, please contact the sysadmin

Posted on 2011-03-24
10
816 Views
Last Modified: 2012-05-11
Hello,

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.

~paulie
0
Comment
Question by:_paulie
  • 5
  • 5
10 Comments
 
LVL 14

Expert Comment

by:svgmuc
ID: 35207089
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.
0
 

Author Comment

by:_paulie
ID: 35207133
Hello,

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.
0
 

Author Comment

by:_paulie
ID: 35207188
Hello,

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

Thanks
0
 
LVL 14

Expert Comment

by:svgmuc
ID: 35207237
Well, you could ltrace the sshd process...
0
 

Author Comment

by:_paulie
ID: 35207280
Unfortunately, I've never done that before. Would you be kind to explain how it works? I'll follow your instructions carefully. Thank you!
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 14

Expert Comment

by:svgmuc
ID: 35207603
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.
0
 

Author Comment

by:_paulie
ID: 35207682
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 [127.0.0.1] port 22

That's all it says.

Thank you!
0
 
LVL 14

Expert Comment

by:svgmuc
ID: 35208587
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?
0
 

Author Comment

by:_paulie
ID: 35208655
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.
0
 
LVL 14

Accepted Solution

by:
svgmuc earned 500 total points
ID: 35208821
That is indeed confusing ;)
Might be a network issue... timeouts...
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Hello to you all, I hear of many people congratulate AWS (Amazon Web Services) on how easy it is to spin up and create new EC2 (Elastic Compute Cloud) instances, but then fail and struggle to connect to them using simple tools such as SSH (Secure…
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now