Author Topic: SSH Server - Failed $CRYPTO_POLICY  (Read 153 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
SSH Server - Failed $CRYPTO_POLICY
« on: October 01, 2024, 08:32:10 PM »
Hello,

One of my server it is stuck!

Code: [Select]
● sshd.service - OpenSSH server daemon
   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Tue 2024-10-01 23:27:07 EEST; 36s ago
     Docs: man:sshd(8)
           man:sshd_config(5)
  Process: 6233 ExecStart=/usr/sbin/sshd -D $OPTIONS $CRYPTO_POLICY (code=exited, status=1/FAILURE)
 Main PID: 6233 (code=exited, status=1/FAILURE)

Oct 01 23:27:07 srv1.localhost systemd[1]: sshd.service: Main process exited, code=exited, status=1/FAILURE
Oct 01 23:27:07 srv1.localhost systemd[1]: sshd.service: Failed with result 'exit-code'.
Oct 01 23:27:07 srv1.localhost systemd[1]: Failed to start OpenSSH server daemon.


SSH Server      Failed       Report Issue
/var/www/home.ro

Offline
**
Re: SSH Server - Failed $CRYPTO_POLICY
« Reply #1 on: October 01, 2024, 09:13:40 PM »
Do you get some errors associated with sshd in /var/log/messages ?

Did you modify
Code: [Select]
/etc/ssh/sshd_config recently ?

Show whole output of "systemctl status sshd.service" and "journalctl -xe".



Offline
*
Re: SSH Server - Failed $CRYPTO_POLICY
« Reply #2 on: October 01, 2024, 09:18:02 PM »
only 22 port, from 22 to custom one..
/var/www/home.ro

Offline
*****
Re: SSH Server - Failed $CRYPTO_POLICY
« Reply #3 on: October 02, 2024, 03:25:50 AM »
Maybe incorrect syntax within /etc/ssh/ssd_config?
Is your custom port open in the CSF firewall?

Offline
**
Re: SSH Server - Failed $CRYPTO_POLICY
« Reply #4 on: October 02, 2024, 06:34:32 AM »
Did you check /var/log/messages ?

Also, do you use some security addons like SELinux ? What does "sestatus" show ? Run it as root in shell.

Offline
*
Re: SSH Server - Failed $CRYPTO_POLICY
« Reply #5 on: October 02, 2024, 06:02:37 PM »
*sestatus*: disabled


I solv the problem,

In /var/log/messages i found this log:

Failed to start OpenSSH server deamon
Unable to load host key

After that i type this command:

/usr/bin/ssh-keygen -A

RESTULT was:

ssh-keygen: generating new host key: RSA DSA ECDSA ED...

after that reboot host, and works

 ;D
/var/www/home.ro

Offline
**
Re: SSH Server - Failed $CRYPTO_POLICY
« Reply #6 on: October 02, 2024, 09:37:34 PM »
Excellent !

REMINDER (for all users): The skills "read logs" and "read docs" increases the possibility to fix the problem up to 90% )