Super User is a question and answer site for computer enthusiasts and power users. 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

Could anyone tell me the exact way to log in to remote host using ssh??I have been trying since quite some time, but couldn't do it.I have successfully created the keygen.But when i am trying to copy the public key to the remote host i get the following line line on the terminal - ssh: connect to host blr-ws-151 port 22: Connection timed out...Need some help badly

share|improve this question

migrated from Nov 4 '11 at 9:05

This question came from our site for professional and enthusiast programmers.

are you sure that you can connect on port 22 to the host you specify ? connection timed out indicates to me that you can't ! – ManseUK Nov 2 '11 at 10:39
Thanks a lot for the valuable reply ManseUK..actually i am totally new to ssh ans using it for the very first time..could you please let me know how to check whether i can connect on port 22 to the remote host or not??..i have already installed ssh on it, but i don't know how to verify this port thing..many thanks – TARIQ Nov 2 '11 at 10:44
you should be able to telnet to that port on that host .... first check that the name resolves to an address using ping <hostname> – ManseUK Nov 2 '11 at 10:46
i am not able to connect to the remote host using telnet also..whenever i am trying to open a connection to that machine i receive the following line - Trying telnet: Unable to connect to remote host: Connection refused – TARIQ Nov 3 '11 at 6:52
the problem is with your connection - it seems that there is no direct connection between you and the server - either all traffic is blocked or a specific port - or the host you are connecting to isnt listening on that port - what OS is the server your connecting to ? – ManseUK Nov 3 '11 at 8:28

The simplest answer is to use:

ssh username@hostname

and you'll be prompted for a password. The hostname can be an IP address

man ssh

This Will give you the other options for using ssh.

share|improve this answer
I am unable to reach the remote host using ssh.Although i am able to ping that system with 0 loss – TARIQ Nov 3 '11 at 6:42

You must log in to answer this question.