SSH : server unexpectedly closed network connection
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ssh too small and simple, no need to debug or investigate deep, all info, errors in real-time located on status message -> login attempts, port, ip, status, wrong login, wrong passwd etc. just try to login and look to systemctl status sshd.service, you will see whats wrong, thats all
marliyev, I do not want to discourage participation but while ssh appears simple it is not. We are trying to help you as well as the OP and being argumentative with members that have more knowledge and experience is counterproductive.
Looking at authentication messages is a start but there are subtle errors that occur where additional debug information is required. Some errors like file permissions are just ignored. To say that all information is provided by login messages may be misleading for others who search here with similar problems.
marliyev, I do not want to discourage participation but while ssh appears simple it is not. We are trying to help you as well as the OP and being argumentative with members that have more knowledge and experience is counterproductive.
Looking at authentication messages is a start but there are subtle errors that occur where additional debug information is required. Some errors like file permissions are just ignored. To say that all information is provided by login messages may be misleading for others who search here with similar problems.
disagree about knowledge and experience, if you have moderator or LQ Guru label its not proof that you better than me its not right way to give advice for simple question long comment, everybody can paste label moderator or Guru and begin searching google for answer i know very well how you all answering questions))) if you are guru in linux, i have open thread go and answer for it, moderator)))
In my case systemctl & journalctl give the exact same output for sshd.
Decreasing the priority of shown messages in journalctl has no effect. It's possible that would be different if I had actual errors happening, like OP.
In any case, journalctl seems to give more granular control.
However, depending on how busy the SSH sever is there, the log may be too much noisy to conveniently find the problem. The method in #8 above works well in a production environment and creates an isolated but complete set of logs for easy analysis.
ssh too small and simple, no need to debug or investigate deep, all info, errors in real-time located on status message -> login attempts, port, ip, status, wrong login, wrong passwd etc. just try to login and look to systemctl status sshd.service, you will see whats wrong, thats all
Still wrong; either you didn't understand what was said or you won't listen. Again, showing the status of the service won't tell you much at all.
Quote:
Originally Posted by marliyev
disagree about knowledge and experience, if you have moderator or LQ Guru label its not proof that you better than me  its not right way to give advice for simple question long comment, everybody can paste label moderator or Guru and begin searching google for answer  i know very well how you all answering questions))) if you are guru in linux, i have open thread go and answer for it, moderator)))
It is obvious you disagree about knowledge and experience, because it appears you have neither, and have no interest in learning. If you think all people do is Google, then its surprising that YOU haven't been able to figure out the problem and don't know better than to just suggest a status command.
And throwing out sarcastic insults then telling people to go answer your question is pretty funny. Why do you think ANYONE would want to help you at this point?
Quote:
Originally Posted by Turbocapitalist
You can refine that even more, if you have a system infected with systemd:
However, depending on how busy the SSH sever is there, the log may be too much noisy to conveniently find the problem. The method in #8 above works well in a production environment and creates an isolated but complete set of logs for easy analysis.
Agreed, but the OP is using Putty, ostensibly on a Windows system. The normal things for a SSH client to see verbosity may not work; not familiar enough with Putty to know that for certain, mind you. You can log connection attempts to a file and review it later, but the "-vvv" on the CLI is much easier (to me).
Still wrong; either you didn't understand what was said or you won't listen. Again, showing the status of the service won't tell you much at all.
It is obvious you disagree about knowledge and experience, because it appears you have neither, and have no interest in learning. If you think all people do is Google, then its surprising that YOU haven't been able to figure out the problem and don't know better than to just suggest a status command.
And throwing out sarcastic insults then telling people to go answer your question is pretty funny. Why do you think ANYONE would want to help you at this point?
Agreed, but the OP is using Putty, ostensibly on a Windows system. The normal things for a SSH client to see verbosity may not work; not familiar enough with Putty to know that for certain, mind you. You can log connection attempts to a file and review it later, but the "-vvv" on the CLI is much easier (to me).
LQ Guru, how you doing? are you seeking for job in internet cafe?
LQ Guru, how you doing? are you seeking for job in internet cafe?
Reported. Please review the LQ Rules...specifically.
Quote:
Do not post any messages that are obscene, vulgar, sexually-orientated, hateful, threatening, hostile or insulting. Personal attacks on others will not be tolerated.
Flame Wars will not be tolerated. Do not post if you do not have anything constructive to say in the post.
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,607
Rep:
marliyev, your posting privileges have been suspended for 24 hours. If you'd like to continue participating at LQ moving forward, please do ensure you follow the rules. If you have any questions, do feel free to contact me directly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.