Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 recently set up an Ubuntu 10.10 (32bit) server on a VPS host. Following the Ubuntu installer I added OpenSSH. Very little else has been installed and it's the default OpenSSH configuration.

For some reason I cannot SSH to the box unless I first open a TightVNC connection through the hosts administration console. As soon as the attempt to VNC to the box is made I'm able to SSH directly to the box (eg. with PuTTY). Closing TightVNC doesn't matter - I can continue to use the open SSH connection and create new sessions.

Any ideas what the issue is and how I go about fixing it?

share|improve this question
Are you getting a straight connection refused, or something else? Might be worth checking by telnetting to the VPN on port 22 and seeing if you get refused or it's accepting the connection and then closing it straight away. – Andy Smith Dec 17 '10 at 21:49
I would ask your VPS host if they're using 'port knocking' for the SSH port. – jharley Dec 17 '10 at 21:53
Complete stab in the dark: what does /sbin/iptables -L -v | grep ssh output? – Kenny Rasschaert Dec 17 '10 at 21:56
What kind of response do you get when you try to SSH without the VNC connection? What is the output of ssh with the inclusion of the -v parameter? – Daemon of Chaos Dec 17 '10 at 21:57
Port Knocking @jharley? Seriously? I've never heard of a hosting company offering that, let alone enabling it by default. Isn't it more likely just, good old fashioned, blocked? – James L Dec 18 '10 at 0:35
up vote 0 down vote accepted

Thanks for the helpful comments - it assisted me to find the actual issue.

The VPS service is - according to this documentation:

Any time you access a server via the WMS control panel, your IP address is transparently and automatically permitted temporary access to all ports on that specific server. When you leave the control panel, those ports are automatically closed behind you.

In reality this takes effect on connecting to the VNC session and this explained why I was getting access temporarily.

The actual issue was that the firewall was configured to only allow http, https and ping inbound. Adding port 22 the firewall inbound rules fixed the issue. Head, meet desk.

Thanks again!

share|improve this answer
For some reason, I find their constant tinkering with your firewall rules highly troubling... Maybe that's just me. – Corey S. Dec 18 '10 at 1:46

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.