How to fix “ssh_exchange_identification: read: Connection reset by peer” error?
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
|
show 1 more comment
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
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 asroot. This is usually not enabled; look at your sshd configuration.ssh -vvvmight give you more information.
– ridgy
May 25 '17 at 12:01
|
show 1 more comment
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
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
ssh
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 asroot. This is usually not enabled; look at your sshd configuration.ssh -vvvmight give you more information.
– ridgy
May 25 '17 at 12:01
|
show 1 more comment
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 asroot. 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
|
show 1 more comment
7 Answers
7
active
oldest
votes
That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login
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
add a comment |
Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.
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
add a comment |
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
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
add a comment |
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...
add a comment |
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.
add a comment |
- Check that sshd in installed and running of the server.
- 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.).
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
add a comment |
To solve the issue, proceed as follows:
- Reboot your server from server online terminal.
If this does not work,
- Edit the file
$HOME/.ssh/known_hosts
- Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.
-1 for the complete deletion ofknown_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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login
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
add a comment |
That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login
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
add a comment |
That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login
That actually means that your IP is blacklisted by the server. Try to whitelist your IP address to be able to login
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
add a comment |
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
add a comment |
Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.
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
add a comment |
Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.
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
add a comment |
Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.
Just reboot your server which you want to ssh. It worked for me, previously I was facing the same issue.
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
add a comment |
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
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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...
add a comment |
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...
add a comment |
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...
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...
answered Jun 11 '18 at 7:28
Elia WeissElia Weiss
11017
11017
add a comment |
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Jan 22 at 14:31
karel
58.5k13128147
58.5k13128147
answered Jan 22 at 13:48
Sayan BiswasSayan Biswas
62
62
add a comment |
add a comment |
- Check that sshd in installed and running of the server.
- 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.).
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
add a comment |
- Check that sshd in installed and running of the server.
- 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.).
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
add a comment |
- Check that sshd in installed and running of the server.
- 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.).
- Check that sshd in installed and running of the server.
- 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.).
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
add a comment |
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
add a comment |
To solve the issue, proceed as follows:
- Reboot your server from server online terminal.
If this does not work,
- Edit the file
$HOME/.ssh/known_hosts
- Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.
-1 for the complete deletion ofknown_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
add a comment |
To solve the issue, proceed as follows:
- Reboot your server from server online terminal.
If this does not work,
- Edit the file
$HOME/.ssh/known_hosts
- Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.
-1 for the complete deletion ofknown_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
add a comment |
To solve the issue, proceed as follows:
- Reboot your server from server online terminal.
If this does not work,
- Edit the file
$HOME/.ssh/known_hosts
- Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.
To solve the issue, proceed as follows:
- Reboot your server from server online terminal.
If this does not work,
- Edit the file
$HOME/.ssh/known_hosts
- Delete any content inside this file, when it will reconnect to any servers you ssh then you must re-accept connections.
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 ofknown_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
add a comment |
-1 for the complete deletion ofknown_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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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