SSH : server unexpectedly closed network connection
Hi
I am using Ubuntu 18.04 and I started getting server unexpectedly closed network connection error while trying to connect using Putty. As this is hosted bare metal server I am not able to check further but tried to boot server into rescue mode and checked the files /etc/ssh/sshd_config /etc/hosts.deny /etc/securetty I have verified these files with my other server along with the permission and it looks same. I have also checked logs but it doesn't show me any thing. Can any one suggest what should be done further in this case any help would be good. Thanks. |
Quote:
Not sure about how to do it with putty, but a typical Linux ssh client will let you run in verbose mode by using it as "ssh -vvv user@address". Putty appears to have some options, but I don't use it so I can't verify: https://www.ssh.com/ssh/putty/putty-.../Chapter3.html There appears to be an event log. May want to check it for any clues. And you say it's a hosted server...has your host allowed SSH to that system? |
I am not using vpn I am connecting to server directly and server is having SSH server installed on it. It was working since last 2 months from today I have started facing this issue.
There is no update happen, no change in files happen. |
Quote:
Can you post the ENTIRE error message you receive when trying to connect, and the answers to the questions asked? The SSH connection logs too, in CODE tags please. |
Quote:
|
Quote:
|
Quote:
|
Yes, there are many possible things going wrong. Starting with the low-hanging fruit, the SSH daemon's logs should be checked for a single session. One way to quckly grab a set of logs related to a single SSH session is to fire up a one-off instance of the SSH daemon and connect to that instead:
Code:
sudo /usr/sbin/ssh -ddd -p 2222 -E /tmp/sshd.log So to connect to that, you'd connect to port 2222 and stay with it untill you get the disconnection. That way, when the session ends, the daemon quits and the log file closes and will contain only the one session, and it alone, from start to end. |
Quote:
You have been giving really bad advice here and in other threads. |
Quote:
|
@TB0ne: I'm sure a statement like "systemctl status sshd.service will show whats wrong" is overly simplifying things, but it's not wrong per se, and I'm a little unsure about your subsequent elaborations - that command will show information about a running sshd process.
Quote:
Frankly, I'm not even sure if "Photoshop user" is an insult, or what it even means, but I'm sure marliyev meant it like that and they display plenty of report-worthy behaviour. @marliev: If you want to persevere in this dispute you should lay off the personal insults. Use your brain. |
Quote:
|
Getting back to the OP...
I’ve most often seen that kind of error in putty when there were problems on the Windows box or with the connectivity at the local ISP. Has either of those things changed? Do you have connectivity problems with any other remote server? Putty’s help is excellent. You can log the connection from there. |
Please stop bickering, personal attacks will not be tolerated.
I agree with TB0ne. By default all you get are the basic AUTH status messages as written to the log files which does not include any verbose debug messages. You can change the loglevel to add debug messages in the sshd_config file which requires a restart. Manually running the sshd daemon from the command line as posted above will also add the debug messages. |
Quote:
Quote:
|
All times are GMT -5. The time now is 12:41 AM. |