[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 833
  • Last Modified:

sshd has failed, please contact the sysadmin

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
_paulie
Asked:
_paulie
  • 5
  • 5
1 Solution
 
svgmucCommented:
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
 
_paulieAuthor Commented:
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
 
_paulieAuthor Commented:
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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
svgmucCommented:
Well, you could ltrace the sshd process...
0
 
_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!
0
 
svgmucCommented:
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
 
_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 [127.0.0.1] port 22

That's all it says.

Thank you!
0
 
svgmucCommented:
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
 
_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.
0
 
svgmucCommented:
That is indeed confusing ;)
Might be a network issue... timeouts...
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

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