Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a weird issue, I've been using this webserver for months without problems, but this morning I accessed with FTP to move some files, and then every time that I wanted to download or upload files I had this error:

**Filezilla log:**

Status:    Connecting to IP...

Response:    fzSftp started

Command:    open "USER@IP" 22
Error:    Server unexpectedly closed network connection
Error:    Could not connect to server
Status:    Waiting to retry...
Status:    Connecting to IP...
Response:    fzSftp started
Command:    open "USER@IP" 22
Error:    Could not connect to server

and then I tried to use SSH to connect to my webserver and I had this error:

ssh_exchange_identification: Connection closed by remote host

All my other services are up and running in the webserver, the issue is just with SSH and FTP.

what should I do right now?

Thanks in advance!!

share|improve this question
Do you have physical access to the server? Is it hosted with another company? Do they have SSH access to the server? – Justin Higgins May 24 '11 at 16:02
Hi, no I the server is far away from my office :S, I think it's time to make some calls, thanks! – mckain May 24 '11 at 16:41

If you own the box, see if you can get console access into it. Verify the daemons are running, and see if you can connect locally. If you can connect locally, but can't externally, check your firewall settings. Some consumer firewalls will upgrade their own firmware automatically, and who knows? Maybe this went bad.

Another possibility if you host it yourself, check if you are using a business class account or a consumer account. Many ISP's will shut down access to known server ports if they see you hosting since it falls outside of your TOS (most consumer ISP's in the USA won't let you run any servers, SSH or otherwise). Call and see if maybe they are blocking you.

If its hosted elsewhere, contact the host and see if there are any problems that could be causing it. So long as you haven't changed anything on your side, the situation points to either a problem on their end, or in between. Either way, they can help you troubleshoot, thats what you're paying them for.

share|improve this answer
are companies really so boneheaded that they start firewalling only after detecting inbound traffic? O_o – David Schmitt May 24 '11 at 16:29
Sadly all i have is anecdotal experience... a buddy of mine had his plan suspended a LONG time ago (gosh, maybe 1997?) when he was running a web server off of his shiny new connection. Either the ISP port scanned him and saw it was open, or they saw the gamut of traffic he was receiving. I'm not sure which. Either way, they sent him a slap on the wrist and said not to do it again. I can only imagine similar practices continue. – Matthew May 24 '11 at 16:35
Hey Matthew, I don't have access to the box, thanks for the comment, I will call for support =S – mckain May 24 '11 at 16:43

You can use tcptraceroute to detect whether this is a connectivity problem (some one has erected a firewall between you and your server) or whether the services on your machine are down.

If you have access to a remote or local console, you can use that to check for kernel log messages on the screen and try a login there.

If the server is managed by a professional company, their support should be able to help you.

Since you say that other services are still running it is possible that your sshd and ftpd fell prey to the out-of-memory killer, which may happen if one or more processes use too much memory. In this case you should be able to reboot the system safely and check the logfile afterwards for traces of this.

share|improve this answer
Thank you David, I'm contacting the support guys to reload the server, then I will check the logs files, weird... – mckain May 24 '11 at 16:54

Run nmap or its graphical brother Zenmap to see if you have anything open on it, such as a webmin control panel that you could possibly use to start useful services with.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.