I'm NO Linux expert, but we have some Linux servers at work. Now there is a problem with 1 of them. SSH only works when entering this command:
exec /usr/sbin/sshd -d
you get 1 session and that's it.
I checked and ssh is running (before executing the exec command). The message states connection refused.
As adviced I allready cleared the known_hosts file, but this didn't work. I don't think it's an issue with port 22, as I CAN connect given the above command.
hi and welcome
-d is the debug mode. sshd will not become a daemon and only serve one connection, as you experience.
Manual Pages: sshd(8)
Dont use that exec line, instead start sshd via its init script.
well, that's the problem. it only works in debug mode...
Ok, so what was changed on that server or for sshd?
What happens, if you start sshd via init?
You can test the configfile with
and look for errors in /var/log/auth.log (debian default)
sshd -T will write the configfile to stdout if no syntax error is found.
thanks mate, it works.
error message: fatal: daemon() failed: No such device
I did this:
and then: "mknod /dev/null c 1 3"
and it works!