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 new to Linux and SSH. when I try to connect to a remote grid computer (for which I have access) I am getting connection timed out error. I have recently installed Ubuntu in my system. I also have OpenSSH client and server. Port 22 is enabled and I can access localhost.

Kindly give me a step by step procedure to solve the problem, as I am new to this whole thing.

regards

share|improve this question
    
Post the output of ssh -vvv host:port –  IgnitE Mar 4 '13 at 9:40
    
output is Open SSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.01c 10May 2012 debug1: reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line19: Applying option for * debug2: ssh_connect: needpriv 0 ssh: could not resolve hostname (my host name:port no): name or service not known –  Priya Mar 4 '13 at 10:03
    
Is the address valid, are you able to ping to that address? –  IgnitE Mar 4 '13 at 10:17
    
The address is valid. my boss is able to connect from his system. –  Priya Mar 4 '13 at 10:19
1  
Clearly the hostname does not resolve into an ip. Can you post the output of 'host yourhostname' (f.e. host my_server.com) or use ip instead of yourhostname when you ssh into the server? –  arrange Mar 4 '13 at 11:15

2 Answers 2

Try to check if port 22 is listening: sudo netstat -alnp |grep :22

Try to allow port in ufw

sudo ufw allow 22

sudo ufw disable && sudo ufw enable

Try to add port into iptables

sudo iptables -A INPUT -i eth1 -p tcp --dport 22 -j ACCEPT

Is port forwarded?

share|improve this answer
    
how do i know whether the port is forwarded ? –  Priya Mar 4 '13 at 10:25
    
These instructions are to check if the server is working and to open firewall on the server but the problem is the client not reaching the server (name resolution problem as seen in comments on Question) and other people are able to connect so I don't think it would be wise to change things on the server at 1st attempt. –  laurent Mar 4 '13 at 11:43

After checking all of your iptables and etc.

Maybe your network Administrator block the port 22 on the LAN switches or change the default ssh port to other number, So check it by him.

share|improve this answer

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.