ssh connection error
Answeredsomebody can help me i am getting an email every day with this error and my sshd is down
/etc/ssh/sshd_config: line 145: Bad configuration option: diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,curve25519-sha256,curve25519-sha256@libssh.org,gss-gex-sha1-,gss-group1-sha1-,gss-group14-sha1-,
-
Hey there! The error is telling you a specific line in the SSH configuration file that is causing the issue. Normally I wouldn't expect all of those things to show up in that file, so you may want to just try commenting it out, saving the file, and then restarting the SSH service to see if that takes care of things, as it that text may have been accidentally placed there by mistake.
0 -
Hey, said,
It seems you are trying to add the Cipher fields in the sshd_config file due to an invalid format it is giving an error.
This could be because in some Linux versions, the KexAlgorithms and Cypher variables that indicate which techniques the SSH daemon supports are missing from /etc/ssh/sshd.conf. Please try including this in the config fileCode:
KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctrAfter saving, regenerate the keys:
Code:
"ssh-keygen -A"Then restart the SSH service.
0 -
sorry for the delay in my reply.
i try both ways commenting out the line and restarting and nothing happen
and including the new code and regenerating the keys and nothing yet.
but i notice some extra information when i check the status and is this:
sshd.service: main process exited, code=exited, status=255/n/a
line 274: Subsystem 'sftp' already defined.
Failed to start OpenSSH server daemon.
Unit sshd.service entered failed state.
sshd.service failed
0 -
Do you have two entries for the sftp server? You should only have one line that looks like this:
Subsystem sftp /usr/libexec/openssh/sftp-server
and that error message seems to indicate there is a duplicate of that line, or something similar, on your configuration file.
0 -
after many test and errors i notice that the configuration was damage, many options no working, it was duplicated and broke so the best thing to do was reinstall ssh service. thanks for the help.
0 -
I'm glad you found a solution!
0
Please sign in to leave a comment.
Comments
6 comments