Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using Ubuntu on my laptop, and am trying to SSH into my VPS with this command:

ssh root@liamwli.co.uk -p xxxx

(Port removed for security)

It doesn't connect however. If I add the -vvv command, I get this:

OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to liamwli.co.uk [69.85.86.19] port xxxx.
debug1: connect to address 69.85.86.19 port xxxx: Connection timed out
ssh: connect to host liamwli.co.uk port xxxx: Connection timed out

Why is it doing this? It works fine, and connects using putty on my Windows installation, so why doesn't it work using the built in ssh client on Ubuntu?

share|improve this question
    
Make sure your port is forwarded properly on 69.85.86.19. That is often the cause of timing out. –  Herman Torjussen Jan 13 '13 at 13:11
    
@htor It is a VPS, and I can connect using putty fine so I highly doubt that is the issue. –  Liam W Jan 13 '13 at 13:39
add comment

2 Answers 2

Since you cannot even get the ssh client to connect, you can rule out things like password/key auth, root logins, etc. Possible reasons why you cannot connect:

  • Wrong port. Maybe you misread you PuTTY configuration.
  • Locked out of your VPS because of too many failed connection attempts (firewall rules, Fail2ban)
  • Port knocking daemon. Maybe your VPS firewall configuration requires you to send data to certain ports before the SSH ports opens. (not sure if PuTTY is that advanced though).
  • VPN required. Perhaps you could connect to your VPS because it was tunnelled through a VPN connection which was activated on Windows, but not on Ubuntu.
  • IP mismatch. Ensure that you are connecting to the same IP address. The IP address could change if you override it in /etc/hosts (or the Windows equivalent) or have a strange DNS server.
  • Outbound blocking. You have a router that is very restrictive and had to add a rule for the Windows IP address to allow for connecting/forwarding to that SSH port. On your Linux installation, you got a different IP address.
share|improve this answer
    
+1. Most times it is one or several of this reasons. –  Luis Alvarado Jan 13 '13 at 21:02
add comment

Normally (by default), SSH does not allow connection to root. This is a security feature, and should not be changed.

Have you tried to another user?

share|improve this answer
add comment

Your Answer

 
discard

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.