ssh - Connection reset by [ip] port 22 (Ubuntu 16.04)
I have been ssh'ing to this computer (also Ubuntu 16) for months, today it's not working.
running ssh -v [ip] yields
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.211 [192.168.0.211] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.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.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.211:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 192.168.0.211 port 22
Running nmap -v [ip] yields
Starting Nmap 7.01 ( https://nmap.org ) at 2018-09-06 08:44 MDT
Initiating Ping Scan at 08:44
Scanning 192.168.0.211 [2 ports]
Completed Ping Scan at 08:44, 0.09s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 08:44
Completed Parallel DNS resolution of 1 host. at 08:44, 0.03s elapsed
Initiating Connect Scan at 08:44
Scanning 192.168.0.211 [1000 ports]
Discovered open port 22/tcp on 192.168.0.211
Discovered open port 80/tcp on 192.168.0.211
Completed Connect Scan at 08:44, 0.49s elapsed (1000 total ports)
Nmap scan report for 192.168.0.211
Host is up (0.012s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.63 seconds
I can ssh from the destination to my computer just fine.
The IP is not inside /etc/hosts.deny
ubuntu ssh networking
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have been ssh'ing to this computer (also Ubuntu 16) for months, today it's not working.
running ssh -v [ip] yields
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.211 [192.168.0.211] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.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.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.211:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 192.168.0.211 port 22
Running nmap -v [ip] yields
Starting Nmap 7.01 ( https://nmap.org ) at 2018-09-06 08:44 MDT
Initiating Ping Scan at 08:44
Scanning 192.168.0.211 [2 ports]
Completed Ping Scan at 08:44, 0.09s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 08:44
Completed Parallel DNS resolution of 1 host. at 08:44, 0.03s elapsed
Initiating Connect Scan at 08:44
Scanning 192.168.0.211 [1000 ports]
Discovered open port 22/tcp on 192.168.0.211
Discovered open port 80/tcp on 192.168.0.211
Completed Connect Scan at 08:44, 0.49s elapsed (1000 total ports)
Nmap scan report for 192.168.0.211
Host is up (0.012s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.63 seconds
I can ssh from the destination to my computer just fine.
The IP is not inside /etc/hosts.deny
ubuntu ssh networking
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Possible duplicate of: unix.stackexchange.com/questions/321968/…
– game0ver
Sep 6 '18 at 15:35
You should check the ssh server log on the remote server. It looks like it's crashing or getting some kind of internal error during key exchange with the client.
– Kenster
Sep 6 '18 at 18:34
@Kenster perfect, checking/var/log/auth.logrevealed that permissions to keys inside/etc/ssh/were set to 0755. For future reference, changing permissions to 400 solved this issue.
– star_trac
Sep 7 '18 at 14:05
add a comment |
I have been ssh'ing to this computer (also Ubuntu 16) for months, today it's not working.
running ssh -v [ip] yields
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.211 [192.168.0.211] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.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.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.211:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 192.168.0.211 port 22
Running nmap -v [ip] yields
Starting Nmap 7.01 ( https://nmap.org ) at 2018-09-06 08:44 MDT
Initiating Ping Scan at 08:44
Scanning 192.168.0.211 [2 ports]
Completed Ping Scan at 08:44, 0.09s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 08:44
Completed Parallel DNS resolution of 1 host. at 08:44, 0.03s elapsed
Initiating Connect Scan at 08:44
Scanning 192.168.0.211 [1000 ports]
Discovered open port 22/tcp on 192.168.0.211
Discovered open port 80/tcp on 192.168.0.211
Completed Connect Scan at 08:44, 0.49s elapsed (1000 total ports)
Nmap scan report for 192.168.0.211
Host is up (0.012s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.63 seconds
I can ssh from the destination to my computer just fine.
The IP is not inside /etc/hosts.deny
ubuntu ssh networking
I have been ssh'ing to this computer (also Ubuntu 16) for months, today it's not working.
running ssh -v [ip] yields
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.0.211 [192.168.0.211] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.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.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.0.211:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
Connection reset by 192.168.0.211 port 22
Running nmap -v [ip] yields
Starting Nmap 7.01 ( https://nmap.org ) at 2018-09-06 08:44 MDT
Initiating Ping Scan at 08:44
Scanning 192.168.0.211 [2 ports]
Completed Ping Scan at 08:44, 0.09s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 08:44
Completed Parallel DNS resolution of 1 host. at 08:44, 0.03s elapsed
Initiating Connect Scan at 08:44
Scanning 192.168.0.211 [1000 ports]
Discovered open port 22/tcp on 192.168.0.211
Discovered open port 80/tcp on 192.168.0.211
Completed Connect Scan at 08:44, 0.49s elapsed (1000 total ports)
Nmap scan report for 192.168.0.211
Host is up (0.012s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
Read data files from: /usr/bin/../share/nmap
Nmap done: 1 IP address (1 host up) scanned in 0.63 seconds
I can ssh from the destination to my computer just fine.
The IP is not inside /etc/hosts.deny
ubuntu ssh networking
ubuntu ssh networking
edited Sep 6 '18 at 15:51
star_trac
asked Sep 6 '18 at 14:48
star_tracstar_trac
165
165
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 8 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Possible duplicate of: unix.stackexchange.com/questions/321968/…
– game0ver
Sep 6 '18 at 15:35
You should check the ssh server log on the remote server. It looks like it's crashing or getting some kind of internal error during key exchange with the client.
– Kenster
Sep 6 '18 at 18:34
@Kenster perfect, checking/var/log/auth.logrevealed that permissions to keys inside/etc/ssh/were set to 0755. For future reference, changing permissions to 400 solved this issue.
– star_trac
Sep 7 '18 at 14:05
add a comment |
Possible duplicate of: unix.stackexchange.com/questions/321968/…
– game0ver
Sep 6 '18 at 15:35
You should check the ssh server log on the remote server. It looks like it's crashing or getting some kind of internal error during key exchange with the client.
– Kenster
Sep 6 '18 at 18:34
@Kenster perfect, checking/var/log/auth.logrevealed that permissions to keys inside/etc/ssh/were set to 0755. For future reference, changing permissions to 400 solved this issue.
– star_trac
Sep 7 '18 at 14:05
Possible duplicate of: unix.stackexchange.com/questions/321968/…
– game0ver
Sep 6 '18 at 15:35
Possible duplicate of: unix.stackexchange.com/questions/321968/…
– game0ver
Sep 6 '18 at 15:35
You should check the ssh server log on the remote server. It looks like it's crashing or getting some kind of internal error during key exchange with the client.
– Kenster
Sep 6 '18 at 18:34
You should check the ssh server log on the remote server. It looks like it's crashing or getting some kind of internal error during key exchange with the client.
– Kenster
Sep 6 '18 at 18:34
@Kenster perfect, checking
/var/log/auth.log revealed that permissions to keys inside /etc/ssh/ were set to 0755. For future reference, changing permissions to 400 solved this issue.– star_trac
Sep 7 '18 at 14:05
@Kenster perfect, checking
/var/log/auth.log revealed that permissions to keys inside /etc/ssh/ were set to 0755. For future reference, changing permissions to 400 solved this issue.– star_trac
Sep 7 '18 at 14:05
add a comment |
1 Answer
1
active
oldest
votes
Putting this here to prevent some future headaches for people googling this issue. I had a tough time finding a good solution. I didn't know there was a log file for ssh-related stuff.
Looking in the log file on the server (/var/log/auth.log) revealed the permissions for various keys in /etc/ssh/ were set to 755, which is too open. Only the user should have perms to see these. So using chmod 400 on all the affected keys solved my problem.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f467312%2fssh-connection-reset-by-ip-port-22-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Putting this here to prevent some future headaches for people googling this issue. I had a tough time finding a good solution. I didn't know there was a log file for ssh-related stuff.
Looking in the log file on the server (/var/log/auth.log) revealed the permissions for various keys in /etc/ssh/ were set to 755, which is too open. Only the user should have perms to see these. So using chmod 400 on all the affected keys solved my problem.
add a comment |
Putting this here to prevent some future headaches for people googling this issue. I had a tough time finding a good solution. I didn't know there was a log file for ssh-related stuff.
Looking in the log file on the server (/var/log/auth.log) revealed the permissions for various keys in /etc/ssh/ were set to 755, which is too open. Only the user should have perms to see these. So using chmod 400 on all the affected keys solved my problem.
add a comment |
Putting this here to prevent some future headaches for people googling this issue. I had a tough time finding a good solution. I didn't know there was a log file for ssh-related stuff.
Looking in the log file on the server (/var/log/auth.log) revealed the permissions for various keys in /etc/ssh/ were set to 755, which is too open. Only the user should have perms to see these. So using chmod 400 on all the affected keys solved my problem.
Putting this here to prevent some future headaches for people googling this issue. I had a tough time finding a good solution. I didn't know there was a log file for ssh-related stuff.
Looking in the log file on the server (/var/log/auth.log) revealed the permissions for various keys in /etc/ssh/ were set to 755, which is too open. Only the user should have perms to see these. So using chmod 400 on all the affected keys solved my problem.
answered Sep 7 '18 at 14:10
star_tracstar_trac
165
165
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f467312%2fssh-connection-reset-by-ip-port-22-ubuntu-16-04%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
Possible duplicate of: unix.stackexchange.com/questions/321968/…
– game0ver
Sep 6 '18 at 15:35
You should check the ssh server log on the remote server. It looks like it's crashing or getting some kind of internal error during key exchange with the client.
– Kenster
Sep 6 '18 at 18:34
@Kenster perfect, checking
/var/log/auth.logrevealed that permissions to keys inside/etc/ssh/were set to 0755. For future reference, changing permissions to 400 solved this issue.– star_trac
Sep 7 '18 at 14:05