Connection to SSH closing immediately
Since last night, a debian server I run in my basement has been refusing ssh connections. The first time it happened was last night when I tried to connect in from another linux machine using the X tunneling option. I assumed that it was just a problem with the X session option so I figured I'd mess with it the next day since it was already late.
Today I tried connecting from school using Putty on a windows machine and I get the error "Server Unexpectedly Closed the Connection" As far as I know, I haven't made any changes to the server. I was using it early last night to do some php coding in Vim with no problems and then later that night it wouldn't let me through. Does anyone have any ideas on how to fix this or troubleshoot it? I'm still in school so I can't get to the machine directly, but I plan to mess with it when I get home. |
Try this from the server: 'ssh myusername@localhost'
If it lets you in then there's something wrong with your network or firewall. If it does NOT let you in then there's something wrong with your configuration or your permissions. |
I tried connecting to root@localhost, and the error I got was identical to the one I got connecting remotely from my linux laptop:
Quote:
Does anyone know what I can do to fix this problem or try to troubleshoot it? |
Are you permitting root login in sshd_config? (Better that you're not permitting it. But that may be the simple reason why you can not log in. Try logging in as a normal user.)
What types of authentication are you allowing in sshd_config? Do you have any tcp_wrappers (/etc/hosts.allow / /etc/hosts.deny) rules in place that would affect sshd? |
I tried logging in as a regular user also. Still no luck. I usually never log in as root altogether but when I went onto the machine to try fixing the ssh problem I logged in as root for some reason.
The other problem I've found is that when I tried re-installing ssh there were a lot of packages that had errors/needed upgrading (2 of which were openssh-server and openssh-client), so I did a dist-upgrade, and there were problems processing 2 packages: openssh-server and ssh Here is a summary of the error I got when doing a dist-upgrade: Quote:
|
You have a problem with your ssh upgrade. Uninstall, then reinstall. Type the following:
dpkg -l | grep ssh Make sure all the ssh packages are uninstalled. Then reinstall ssh. apt-get remove --purge openssh-client openssh-server apt-get install ssh Restart then on the same machine run: ssh root@localhost |
Try "ssh -vv username@localhost". It will provide more detail as to when the error occurs.
|
Totally purging ssh and re-installing worked, thanks!
|
Hey there. i found this on the coLinux wiki. its great and it fixed it for me. ill post the link but the fix aswell because i noticed that URLs dont last long in the linux world. they keep moving things!
http://colinux.wikia.com/wiki/CoLinuxForDummies basically theres a bug in the fs that comes with colinux Quote:
|
All times are GMT -5. The time now is 07:16 PM. |