How to fix “ssh_exchange_identification: read: Connection reset by peer” error?












8















I cannot connect to my server via ssh using my computer, but I can connect to this server via my cell phone using termius app. I have checked /etc/hosts.allow and /etc/hosts.deny and my iptables, and I have alse searched google, it seems no answer fits this problem. I don't know how to solve it , here is ssh -v 183.17.228.80 output



debug1: Connecting to 183.17.228.80 [183.17.228.80] port 22.
debug1: Connection established.=======================
debug1: permanently_set_uid: 0/0
debug1: SELinux support disabled
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
ssh_exchange_identification: read: Connection reset by peer


I can ping this server, here is telnet



telnet 183.17.228.29 22  
Trying 183.17.228.29...
Connected to 183.17.228.29.
Escape character is '^]'.
Connection closed by foreign host.









share|improve this question

























  • Might want to check if you've got DenyHosts installed, DenyHosts has its own allow and deny hosts files.

    – Robby1212
    May 25 '17 at 5:39











  • are you sure that the software you're running on the PC is compatible with all the SSH encryption modes?

    – Tharaka Devinda
    May 25 '17 at 5:56











  • as I mentioned, I have checked hosts files, not for DenyHosts

    – user3054879
    May 25 '17 at 7:05











  • I'm not sure, maybe the encrytion algorithm was different, but my client was putty....but I can ssh to the same server by terminus on IOS

    – user3054879
    May 25 '17 at 7:07











  • From the path of the key files I suppose you are connecting as root. This is usually not enabled; look at your sshd configuration. ssh -vvvmight give you more information.

    – ridgy
    May 25 '17 at 12:01


















8















I cannot connect to my server via ssh using my computer, but I can connect to this server via my cell phone using termius app. I have checked /etc/hosts.allow and /etc/hosts.deny and my iptables, and I have alse searched google, it seems no answer fits this problem. I don't know how to solve it , here is ssh -v 183.17.228.80 output



debug1: Connecting to 183.17.228.80 [183.17.228.80] port 22.
debug1: Connection established.=======================
debug1: permanently_set_uid: 0/0
debug1: SELinux support disabled
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
ssh_exchange_identification: read: Connection reset by peer


I can ping this server, here is telnet



telnet 183.17.228.29 22  
Trying 183.17.228.29...
Connected to 183.17.228.29.
Escape character is '^]'.
Connection closed by foreign host.









share|improve this question

























  • Might want to check if you've got DenyHosts installed, DenyHosts has its own allow and deny hosts files.

    – Robby1212
    May 25 '17 at 5:39











  • are you sure that the software you're running on the PC is compatible with all the SSH encryption modes?

    – Tharaka Devinda
    May 25 '17 at 5:56











  • as I mentioned, I have checked hosts files, not for DenyHosts

    – user3054879
    May 25 '17 at 7:05











  • I'm not sure, maybe the encrytion algorithm was different, but my client was putty....but I can ssh to the same server by terminus on IOS

    – user3054879
    May 25 '17 at 7:07











  • From the path of the key files I suppose you are connecting as root. This is usually not enabled; look at your sshd configuration. ssh -vvvmight give you more information.

    – ridgy
    May 25 '17 at 12:01
















8












8








8


2






I cannot connect to my server via ssh using my computer, but I can connect to this server via my cell phone using termius app. I have checked /etc/hosts.allow and /etc/hosts.deny and my iptables, and I have alse searched google, it seems no answer fits this problem. I don't know how to solve it , here is ssh -v 183.17.228.80 output



debug1: Connecting to 183.17.228.80 [183.17.228.80] port 22.
debug1: Connection established.=======================
debug1: permanently_set_uid: 0/0
debug1: SELinux support disabled
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
ssh_exchange_identification: read: Connection reset by peer


I can ping this server, here is telnet



telnet 183.17.228.29 22  
Trying 183.17.228.29...
Connected to 183.17.228.29.
Escape character is '^]'.
Connection closed by foreign host.









share|improve this question
















I cannot connect to my server via ssh using my computer, but I can connect to this server via my cell phone using termius app. I have checked /etc/hosts.allow and /etc/hosts.deny and my iptables, and I have alse searched google, it seems no answer fits this problem. I don't know how to solve it , here is ssh -v 183.17.228.80 output



debug1: Connecting to 183.17.228.80 [183.17.228.80] port 22.
debug1: Connection established.=======================
debug1: permanently_set_uid: 0/0
debug1: SELinux support disabled
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
ssh_exchange_identification: read: Connection reset by peer


I can ping this server, here is telnet



telnet 183.17.228.29 22  
Trying 183.17.228.29...
Connected to 183.17.228.29.
Escape character is '^]'.
Connection closed by foreign host.






ssh






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 7 '17 at 0:48









Diogo Gomes

325113




325113










asked May 25 '17 at 5:18









user3054879user3054879

64127




64127













  • Might want to check if you've got DenyHosts installed, DenyHosts has its own allow and deny hosts files.

    – Robby1212
    May 25 '17 at 5:39











  • are you sure that the software you're running on the PC is compatible with all the SSH encryption modes?

    – Tharaka Devinda
    May 25 '17 at 5:56











  • as I mentioned, I have checked hosts files, not for DenyHosts

    – user3054879
    May 25 '17 at 7:05











  • I'm not sure, maybe the encrytion algorithm was different, but my client was putty....but I can ssh to the same server by terminus on IOS

    – user3054879
    May 25 '17 at 7:07











  • From the path of the key files I suppose you are connecting as root. This is usually not enabled; look at your sshd configuration. ssh -vvvmight give you more information.

    – ridgy
    May 25 '17 at 12:01





















  • Might want to check if you've got DenyHosts installed, DenyHosts has its own allow and deny hosts files.

    – Robby1212
    May 25 '17 at 5:39











  • are you sure that the software you're running on the PC is compatible with all the SSH encryption modes?

    – Tharaka Devinda
    May 25 '17 at 5:56











  • as I mentioned, I have checked hosts files, not for DenyHosts

    – user3054879
    May 25 '17 at 7:05











  • I'm not sure, maybe the encrytion algorithm was different, but my client was putty....but I can ssh to the same server by terminus on IOS

    – user3054879
    May 25 '17 at 7:07











  • From the path of the key files I suppose you are connecting as root. This is usually not enabled; look at your sshd configuration. ssh -vvvmight give you more information.

    – ridgy
    May 25 '17 at 12:01



















Might want to check if you've got DenyHosts installed, DenyHosts has its own allow and deny hosts files.

– Robby1212
May 25 '17 at 5:39





Might want to check if you've got DenyHosts installed, DenyHosts has its own allow and deny hosts files.

– Robby1212
May 25 '17 at 5:39













are you sure that the software you're running on the PC is compatible with all the SSH encryption modes?

– Tharaka Devinda
May 25 '17 at 5:56





are you sure that the software you're running on the PC is compatible with all the SSH encryption modes?

– Tharaka Devinda
May 25 '17 at 5:56













as I mentioned, I have checked hosts files, not for DenyHosts

– user3054879
May 25 '17 at 7:05





as I mentioned, I have checked hosts files, not for DenyHosts

– user3054879
May 25 '17 at 7:05













I'm not sure, maybe the encrytion algorithm was different, but my client was putty....but I can ssh to the same server by terminus on IOS

– user3054879
May 25 '17 at 7:07





I'm not sure, maybe the encrytion algorithm was different, but my client was putty....but I can ssh to the same server by terminus on IOS

– user3054879
May 25 '17 at 7:07













From the path of the key files I suppose you are connecting as root. This is usually not enabled; look at your sshd configuration. ssh -vvvmight give you more information.

– ridgy
May 25 '17 at 12:01







From the path of the key files I suppose you are connecting as root. This is usually not enabled; look at your sshd configuration. ssh -vvvmight give you more information.

– ridgy
May 25 '17 at 12:01












7 Answers
7






active

oldest

votes


















4














That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login






share|improve this answer



















  • 5





    That is really not necessarily the case.

    – sempaiscuba
    Aug 16 '17 at 14:01






  • 2





    This seemed to be true for me. I found out that my Cloudways server had blacklisted my home IP, and I needed to manually whitelist it.

    – Ryan
    Oct 3 '17 at 14:59





















3














Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.






share|improve this answer
























  • Could not find the root cause, but rebooting worked for me.

    – Raghavendra N
    Feb 20 '18 at 18:51











  • I ran into the same issue when ssh to my free server on AWS. It is caused by server is exhaust of memory. Reboot works.

    – leon
    Jun 13 '18 at 3:37






  • 1





    rebooting the server is a horrible answer for anything on stackexchange

    – thistleknot
    Nov 19 '18 at 20:24



















0














The above error happen when you have limit of failed try to authenticate to the server and you have too many ssh keys on your client (more than value of MaxAuthTries)



What you can try is to increase the value of MaxAuthTries and restart sshd daemon. Or you can limit the number of keys in your ~/.ssh directory and use subdirectories and ~/.ssh/config file to define key per host/group of hosts






share|improve this answer
























  • I have tried this, but failed, in fact I almost tried every method I can found on the internet, I guess the key was encryption negeotiation algorithm, but I don't how to fix it

    – user3054879
    May 25 '17 at 7:10






  • 1





    what did you try? please update your question

    – Romeo Ninov
    May 25 '17 at 7:29



















0














I'm using my cellular hot spot to connect to the web, while I was working the console froze, and I couldn't connect any more ssh_exchange_identification: read: Connection reset by peer



I tried to reset the SRV but it didn't help



Only when I change my network connection (to a hotspot on a different cellular) I could connect again.



NOTE: I can still use the old connection to connect to SRVs on a different AWS, strange...






share|improve this answer































    0














    The way I solved the problem is I went to the host machine and ran a few commands.



    sudo mkdir /var/run/sshd
    sudo chmod 755 -R /var/run/sshd
    sudo service ssh restart


    I got connected to the machine after that.






    share|improve this answer

































      -1















      1. Check that sshd in installed and running of the server.

      2. Make sure that the daemon is installed and started.You must be able to 'man sshd'. I think that package it is in is open-ssl, and you will need to start the daemon ( and stop it when you don't need it.).






      share|improve this answer
























      • of course I have installed sshd, as I mentioned, I can ssh to the same server by terminus on iphone...but putty failed

        – user3054879
        May 25 '17 at 7:08



















      -1














      To solve the issue, proceed as follows:




      1. Reboot your server from server online terminal.



      If this does not work,




      1. Edit the file $HOME/.ssh/known_hosts


      2. Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.






      share|improve this answer


























      • -1 for the complete deletion of known_hosts. It would be better to edit this particular host in question (although I doubt that will help here).

        – David Foerster
        Oct 29 '18 at 8:35













      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f918667%2fhow-to-fix-ssh-exchange-identification-read-connection-reset-by-peer-error%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      7 Answers
      7






      active

      oldest

      votes








      7 Answers
      7






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login






      share|improve this answer



















      • 5





        That is really not necessarily the case.

        – sempaiscuba
        Aug 16 '17 at 14:01






      • 2





        This seemed to be true for me. I found out that my Cloudways server had blacklisted my home IP, and I needed to manually whitelist it.

        – Ryan
        Oct 3 '17 at 14:59


















      4














      That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login






      share|improve this answer



















      • 5





        That is really not necessarily the case.

        – sempaiscuba
        Aug 16 '17 at 14:01






      • 2





        This seemed to be true for me. I found out that my Cloudways server had blacklisted my home IP, and I needed to manually whitelist it.

        – Ryan
        Oct 3 '17 at 14:59
















      4












      4








      4







      That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login






      share|improve this answer













      That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Aug 16 '17 at 13:39









      RazzRazz

      412




      412








      • 5





        That is really not necessarily the case.

        – sempaiscuba
        Aug 16 '17 at 14:01






      • 2





        This seemed to be true for me. I found out that my Cloudways server had blacklisted my home IP, and I needed to manually whitelist it.

        – Ryan
        Oct 3 '17 at 14:59
















      • 5





        That is really not necessarily the case.

        – sempaiscuba
        Aug 16 '17 at 14:01






      • 2





        This seemed to be true for me. I found out that my Cloudways server had blacklisted my home IP, and I needed to manually whitelist it.

        – Ryan
        Oct 3 '17 at 14:59










      5




      5





      That is really not necessarily the case.

      – sempaiscuba
      Aug 16 '17 at 14:01





      That is really not necessarily the case.

      – sempaiscuba
      Aug 16 '17 at 14:01




      2




      2





      This seemed to be true for me. I found out that my Cloudways server had blacklisted my home IP, and I needed to manually whitelist it.

      – Ryan
      Oct 3 '17 at 14:59







      This seemed to be true for me. I found out that my Cloudways server had blacklisted my home IP, and I needed to manually whitelist it.

      – Ryan
      Oct 3 '17 at 14:59















      3














      Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.






      share|improve this answer
























      • Could not find the root cause, but rebooting worked for me.

        – Raghavendra N
        Feb 20 '18 at 18:51











      • I ran into the same issue when ssh to my free server on AWS. It is caused by server is exhaust of memory. Reboot works.

        – leon
        Jun 13 '18 at 3:37






      • 1





        rebooting the server is a horrible answer for anything on stackexchange

        – thistleknot
        Nov 19 '18 at 20:24
















      3














      Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.






      share|improve this answer
























      • Could not find the root cause, but rebooting worked for me.

        – Raghavendra N
        Feb 20 '18 at 18:51











      • I ran into the same issue when ssh to my free server on AWS. It is caused by server is exhaust of memory. Reboot works.

        – leon
        Jun 13 '18 at 3:37






      • 1





        rebooting the server is a horrible answer for anything on stackexchange

        – thistleknot
        Nov 19 '18 at 20:24














      3












      3








      3







      Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.






      share|improve this answer













      Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Oct 27 '17 at 16:55









      Harsh SinghalHarsh Singhal

      392




      392













      • Could not find the root cause, but rebooting worked for me.

        – Raghavendra N
        Feb 20 '18 at 18:51











      • I ran into the same issue when ssh to my free server on AWS. It is caused by server is exhaust of memory. Reboot works.

        – leon
        Jun 13 '18 at 3:37






      • 1





        rebooting the server is a horrible answer for anything on stackexchange

        – thistleknot
        Nov 19 '18 at 20:24



















      • Could not find the root cause, but rebooting worked for me.

        – Raghavendra N
        Feb 20 '18 at 18:51











      • I ran into the same issue when ssh to my free server on AWS. It is caused by server is exhaust of memory. Reboot works.

        – leon
        Jun 13 '18 at 3:37






      • 1





        rebooting the server is a horrible answer for anything on stackexchange

        – thistleknot
        Nov 19 '18 at 20:24

















      Could not find the root cause, but rebooting worked for me.

      – Raghavendra N
      Feb 20 '18 at 18:51





      Could not find the root cause, but rebooting worked for me.

      – Raghavendra N
      Feb 20 '18 at 18:51













      I ran into the same issue when ssh to my free server on AWS. It is caused by server is exhaust of memory. Reboot works.

      – leon
      Jun 13 '18 at 3:37





      I ran into the same issue when ssh to my free server on AWS. It is caused by server is exhaust of memory. Reboot works.

      – leon
      Jun 13 '18 at 3:37




      1




      1





      rebooting the server is a horrible answer for anything on stackexchange

      – thistleknot
      Nov 19 '18 at 20:24





      rebooting the server is a horrible answer for anything on stackexchange

      – thistleknot
      Nov 19 '18 at 20:24











      0














      The above error happen when you have limit of failed try to authenticate to the server and you have too many ssh keys on your client (more than value of MaxAuthTries)



      What you can try is to increase the value of MaxAuthTries and restart sshd daemon. Or you can limit the number of keys in your ~/.ssh directory and use subdirectories and ~/.ssh/config file to define key per host/group of hosts






      share|improve this answer
























      • I have tried this, but failed, in fact I almost tried every method I can found on the internet, I guess the key was encryption negeotiation algorithm, but I don't how to fix it

        – user3054879
        May 25 '17 at 7:10






      • 1





        what did you try? please update your question

        – Romeo Ninov
        May 25 '17 at 7:29
















      0














      The above error happen when you have limit of failed try to authenticate to the server and you have too many ssh keys on your client (more than value of MaxAuthTries)



      What you can try is to increase the value of MaxAuthTries and restart sshd daemon. Or you can limit the number of keys in your ~/.ssh directory and use subdirectories and ~/.ssh/config file to define key per host/group of hosts






      share|improve this answer
























      • I have tried this, but failed, in fact I almost tried every method I can found on the internet, I guess the key was encryption negeotiation algorithm, but I don't how to fix it

        – user3054879
        May 25 '17 at 7:10






      • 1





        what did you try? please update your question

        – Romeo Ninov
        May 25 '17 at 7:29














      0












      0








      0







      The above error happen when you have limit of failed try to authenticate to the server and you have too many ssh keys on your client (more than value of MaxAuthTries)



      What you can try is to increase the value of MaxAuthTries and restart sshd daemon. Or you can limit the number of keys in your ~/.ssh directory and use subdirectories and ~/.ssh/config file to define key per host/group of hosts






      share|improve this answer













      The above error happen when you have limit of failed try to authenticate to the server and you have too many ssh keys on your client (more than value of MaxAuthTries)



      What you can try is to increase the value of MaxAuthTries and restart sshd daemon. Or you can limit the number of keys in your ~/.ssh directory and use subdirectories and ~/.ssh/config file to define key per host/group of hosts







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered May 25 '17 at 6:58









      Romeo NinovRomeo Ninov

      39318




      39318













      • I have tried this, but failed, in fact I almost tried every method I can found on the internet, I guess the key was encryption negeotiation algorithm, but I don't how to fix it

        – user3054879
        May 25 '17 at 7:10






      • 1





        what did you try? please update your question

        – Romeo Ninov
        May 25 '17 at 7:29



















      • I have tried this, but failed, in fact I almost tried every method I can found on the internet, I guess the key was encryption negeotiation algorithm, but I don't how to fix it

        – user3054879
        May 25 '17 at 7:10






      • 1





        what did you try? please update your question

        – Romeo Ninov
        May 25 '17 at 7:29

















      I have tried this, but failed, in fact I almost tried every method I can found on the internet, I guess the key was encryption negeotiation algorithm, but I don't how to fix it

      – user3054879
      May 25 '17 at 7:10





      I have tried this, but failed, in fact I almost tried every method I can found on the internet, I guess the key was encryption negeotiation algorithm, but I don't how to fix it

      – user3054879
      May 25 '17 at 7:10




      1




      1





      what did you try? please update your question

      – Romeo Ninov
      May 25 '17 at 7:29





      what did you try? please update your question

      – Romeo Ninov
      May 25 '17 at 7:29











      0














      I'm using my cellular hot spot to connect to the web, while I was working the console froze, and I couldn't connect any more ssh_exchange_identification: read: Connection reset by peer



      I tried to reset the SRV but it didn't help



      Only when I change my network connection (to a hotspot on a different cellular) I could connect again.



      NOTE: I can still use the old connection to connect to SRVs on a different AWS, strange...






      share|improve this answer




























        0














        I'm using my cellular hot spot to connect to the web, while I was working the console froze, and I couldn't connect any more ssh_exchange_identification: read: Connection reset by peer



        I tried to reset the SRV but it didn't help



        Only when I change my network connection (to a hotspot on a different cellular) I could connect again.



        NOTE: I can still use the old connection to connect to SRVs on a different AWS, strange...






        share|improve this answer


























          0












          0








          0







          I'm using my cellular hot spot to connect to the web, while I was working the console froze, and I couldn't connect any more ssh_exchange_identification: read: Connection reset by peer



          I tried to reset the SRV but it didn't help



          Only when I change my network connection (to a hotspot on a different cellular) I could connect again.



          NOTE: I can still use the old connection to connect to SRVs on a different AWS, strange...






          share|improve this answer













          I'm using my cellular hot spot to connect to the web, while I was working the console froze, and I couldn't connect any more ssh_exchange_identification: read: Connection reset by peer



          I tried to reset the SRV but it didn't help



          Only when I change my network connection (to a hotspot on a different cellular) I could connect again.



          NOTE: I can still use the old connection to connect to SRVs on a different AWS, strange...







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 11 '18 at 7:28









          Elia WeissElia Weiss

          11017




          11017























              0














              The way I solved the problem is I went to the host machine and ran a few commands.



              sudo mkdir /var/run/sshd
              sudo chmod 755 -R /var/run/sshd
              sudo service ssh restart


              I got connected to the machine after that.






              share|improve this answer






























                0














                The way I solved the problem is I went to the host machine and ran a few commands.



                sudo mkdir /var/run/sshd
                sudo chmod 755 -R /var/run/sshd
                sudo service ssh restart


                I got connected to the machine after that.






                share|improve this answer




























                  0












                  0








                  0







                  The way I solved the problem is I went to the host machine and ran a few commands.



                  sudo mkdir /var/run/sshd
                  sudo chmod 755 -R /var/run/sshd
                  sudo service ssh restart


                  I got connected to the machine after that.






                  share|improve this answer















                  The way I solved the problem is I went to the host machine and ran a few commands.



                  sudo mkdir /var/run/sshd
                  sudo chmod 755 -R /var/run/sshd
                  sudo service ssh restart


                  I got connected to the machine after that.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 22 at 14:31









                  karel

                  58.5k13128147




                  58.5k13128147










                  answered Jan 22 at 13:48









                  Sayan BiswasSayan Biswas

                  62




                  62























                      -1















                      1. Check that sshd in installed and running of the server.

                      2. Make sure that the daemon is installed and started.You must be able to 'man sshd'. I think that package it is in is open-ssl, and you will need to start the daemon ( and stop it when you don't need it.).






                      share|improve this answer
























                      • of course I have installed sshd, as I mentioned, I can ssh to the same server by terminus on iphone...but putty failed

                        – user3054879
                        May 25 '17 at 7:08
















                      -1















                      1. Check that sshd in installed and running of the server.

                      2. Make sure that the daemon is installed and started.You must be able to 'man sshd'. I think that package it is in is open-ssl, and you will need to start the daemon ( and stop it when you don't need it.).






                      share|improve this answer
























                      • of course I have installed sshd, as I mentioned, I can ssh to the same server by terminus on iphone...but putty failed

                        – user3054879
                        May 25 '17 at 7:08














                      -1












                      -1








                      -1








                      1. Check that sshd in installed and running of the server.

                      2. Make sure that the daemon is installed and started.You must be able to 'man sshd'. I think that package it is in is open-ssl, and you will need to start the daemon ( and stop it when you don't need it.).






                      share|improve this answer














                      1. Check that sshd in installed and running of the server.

                      2. Make sure that the daemon is installed and started.You must be able to 'man sshd'. I think that package it is in is open-ssl, and you will need to start the daemon ( and stop it when you don't need it.).







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered May 25 '17 at 5:34









                      Bruce SalemBruce Salem

                      92




                      92













                      • of course I have installed sshd, as I mentioned, I can ssh to the same server by terminus on iphone...but putty failed

                        – user3054879
                        May 25 '17 at 7:08



















                      • of course I have installed sshd, as I mentioned, I can ssh to the same server by terminus on iphone...but putty failed

                        – user3054879
                        May 25 '17 at 7:08

















                      of course I have installed sshd, as I mentioned, I can ssh to the same server by terminus on iphone...but putty failed

                      – user3054879
                      May 25 '17 at 7:08





                      of course I have installed sshd, as I mentioned, I can ssh to the same server by terminus on iphone...but putty failed

                      – user3054879
                      May 25 '17 at 7:08











                      -1














                      To solve the issue, proceed as follows:




                      1. Reboot your server from server online terminal.



                      If this does not work,




                      1. Edit the file $HOME/.ssh/known_hosts


                      2. Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.






                      share|improve this answer


























                      • -1 for the complete deletion of known_hosts. It would be better to edit this particular host in question (although I doubt that will help here).

                        – David Foerster
                        Oct 29 '18 at 8:35


















                      -1














                      To solve the issue, proceed as follows:




                      1. Reboot your server from server online terminal.



                      If this does not work,




                      1. Edit the file $HOME/.ssh/known_hosts


                      2. Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.






                      share|improve this answer


























                      • -1 for the complete deletion of known_hosts. It would be better to edit this particular host in question (although I doubt that will help here).

                        – David Foerster
                        Oct 29 '18 at 8:35
















                      -1












                      -1








                      -1







                      To solve the issue, proceed as follows:




                      1. Reboot your server from server online terminal.



                      If this does not work,




                      1. Edit the file $HOME/.ssh/known_hosts


                      2. Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.






                      share|improve this answer















                      To solve the issue, proceed as follows:




                      1. Reboot your server from server online terminal.



                      If this does not work,




                      1. Edit the file $HOME/.ssh/known_hosts


                      2. Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Oct 29 '18 at 8:57









                      Yufenyuy Veyeh Dider

                      1,5234924




                      1,5234924










                      answered Oct 29 '18 at 7:40









                      mkmrmkmr

                      1




                      1













                      • -1 for the complete deletion of known_hosts. It would be better to edit this particular host in question (although I doubt that will help here).

                        – David Foerster
                        Oct 29 '18 at 8:35





















                      • -1 for the complete deletion of known_hosts. It would be better to edit this particular host in question (although I doubt that will help here).

                        – David Foerster
                        Oct 29 '18 at 8:35



















                      -1 for the complete deletion of known_hosts. It would be better to edit this particular host in question (although I doubt that will help here).

                      – David Foerster
                      Oct 29 '18 at 8:35







                      -1 for the complete deletion of known_hosts. It would be better to edit this particular host in question (although I doubt that will help here).

                      – David Foerster
                      Oct 29 '18 at 8:35




















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f918667%2fhow-to-fix-ssh-exchange-identification-read-connection-reset-by-peer-error%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Category:香港粉麵

                      List *all* the tuples!

                      Channel [V]