Hello,
I am aware that I am not the only one who has posted about this problem on here. However, I have looked through the existing threads regarding this issue, and have tried a number of different solutions offered both here and on other websites, and I am still not having any luck with my problem. Thus, I am posting this thread in the hopes that someone might know what the cause of this problem is and how to resolve it.
The problem:
I have a server running Ubuntu 11.10 (GNU/Linux 3.0.0-15-server x86_64). This server has been working fine for almost a year. I installed all necessary services on the server such as openssh-server and was able to log in to this machine using SSH just fine up until just a few months ago.
For some odd reason, I am randomly unable to connect to my server from any Mac OSX workstation on the network. When I say "randomly", I mean that sometimes I am able to login, and other times I receive one of the following errors (note: my server's static LAN IP is 192.168.1.15):
Code:
me@mac$ ssh me@192.168.1.15
write: Broken pipe
Code:
me@mac$ ssh me@192.168.1.15
ssh: connect to host 192.168.1.15 port 22: Connection refused
I don't know what is causing this error, and I never receive this message when trying to connect from other machines such as another Ubuntu server.
I have checked the firewall configurations on both my server, my macintosh, and the network firewall. There is nothing in the firewall configurations on any of these devices that would prevent me from connecting.
I also have checked the sshd configurations, everything seems to be in order. The server is configured to listen on port 22, and I am able to connect to it fine from my other Ubuntu server. This problem seems to only occur when trying to connect from my Mac. (And again, I did check the firewall settings on my Mac as well, there is nothing in them that would prevent my connection - the firewall is set up to allow ALL connections outbound and inbound)
Today, I was finally able to connect to my Ubuntu server after about 25 attempts. Shortly afterwards, I get this message:
Code:
me@myserver$ Read from remote host 192.168.1.15: Connection reset by peer
Connection to 192.168.1.15 closed.
I tried to re-connect, and this was the result:
Code:
me@mac$ ssh me@192.168.1.15
ssh: connect to host 192.168.1.15 port 22: Connection refused
I also tried executing the command in verbose mode, to see if it might help me identify the problem. This was the output:
Code:
me@mac$ ssh -vv me@192.168.1.15
OpenSSH_5.2p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.15 [192.168.1.15] port 22.
debug1: connect to address 192.168.1.15 port 22: Connection refused
ssh: connect to host 192.168.1.15 port 22: Connection refused
I have tried removing the entries in my local known_hosts file as well as the one on the server's end. I also tried removing the entire file altogether, which also yielded no results. I tried completely uninstalling the openssh-server, openssh-client and other related services and re-installing them. I am still having this problem.
The reproducability of the problem seems to be totally random. Some times (usually after about 25-100 attempts) I am able to finally connect to my server. Other times, I just keep getting the connection refused error message. When I finally am able to log in, the server randomly disconnects me.
Does anyone know what is going on here? I am totally stumped. I have searched all over the web and through these forums to see if I could find an answer. I have tried numerous solutions and nothing I've tried seems to get me anywhere.
I would greatly appreciate it if anyone has some useful advice for dealing with this issue.
Thanks!
Bookmarks