Skip to main content

ssh connection error

Answered

Comments

6 comments

  • cPRex Jurassic Moderator

    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
  • MilesWeb

    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 file

    Code:
    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-ctr

    After saving, regenerate the keys:

    Code:
    "ssh-keygen -A"

    Then restart the SSH service.



    0
  • Said

    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
  • cPRex Jurassic Moderator

    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
  • Said

    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
  • cPRex Jurassic Moderator

    I'm glad you found a solution!

    0

Please sign in to leave a comment.