Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
04-28-2009, 08:41 AM
|
#1
|
LQ Newbie
Registered: Apr 2009
Posts: 14
Rep:
|
Different SSH "Server unexpectedly closed network connection" (using Putty)
I know there have been numerous threads about this, but the fixes in those don't seem to be working. I have a server running OpenSuse 9.0, and I wanted to lock it down so in SSHD_Config I changed 'Allow root login' to 'No' then added a couple of users. However, whenever I try logging in with any of these users via Putty I get the above error message.
I've already changed UseDNS to 'No' and run the 'Touch /etc/environment' command, but still the problem persists. Interestingly, when I change 'Allow root login' back to 'Yes' that works fine logging on via Putty, so the problem must lie with the new users I have set up, but I'm not doing anything different to how I've set these users up on eight other OpenSuse 9.0 servers, and they all work fine with Putty ?
|
|
|
04-30-2009, 09:22 AM
|
#2
|
LQ Newbie
Registered: Oct 2008
Location: Hyderabad
Posts: 26
Rep:
|
Have you restarted the ssh server after changing root login to yes/no.For the changes to take effect we need to restart the ssh service
|
|
|
05-29-2009, 05:00 AM
|
#3
|
LQ Newbie
Registered: Apr 2009
Posts: 14
Original Poster
Rep:
|
Still not getting anywhere with this one,and it's now happening on six out of my nine OpenSuse 9 servers. I've checked the messages log and the error shown is
fatal: ssh_msg_send: write
has anyone seen this before ?
|
|
|
07-22-2009, 07:10 AM
|
#4
|
LQ Newbie
Registered: Apr 2009
Posts: 14
Original Poster
Rep:
|
Two months later..................
I've been trying various things to try and fix this without success, but have discovered one thing. If I change the setting in sshd.config to allow root login then logon via Putty using root it works fine. So this is only happening if I try and connect using normal user IDs. So I guess the problem is something to with permissions/allowing connections from standard user IDs ?
|
|
|
07-22-2009, 08:23 AM
|
#5
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Check the permissions of your ~/.ssh directory and of your private key.
Also check the permissions of your home directory.
Consider removing the rx permissions for the "users" group on your home directory. I use SuSE, and adding a group for myself and making this my default group is the first thing I do after installing. I think they do this to allow users to share folders in their home directories.
Also consider using public key authentication. In the sshd_config file, the commented paragraph above the "UsePAM Yes" line explains clearly which settings to change. In putty on your Windows machine, you can load in your key in their keygen program. The openssh compatible public key is displayed at the top. Copy the public key and add it to your ~/.ssh/authorized_keys file.
If you are doing all this remotely, don't change sshd_config until you have saved your public key in your ~/.ssh/authorized_keys file. And keep your first ssh session open, and test it by logging in again. That way, if it works, you can revert to the old sshd_config.
I would prefer using the regular ssh client of Cygwin/X if I were logging in from a Windows machine. That allows you to run GUI programs on the ssh server. YaST2 for example. The SuSE host doesn't need to be running in init level 5.
Last edited by jschiwal; 07-22-2009 at 08:30 AM.
|
|
|
All times are GMT -5. The time now is 01:25 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|