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 am trying to run ssh command from one machine to another and gets the following error message ssh: connect to host port 22: Connection refused It is able to ping the same machine properly. I have ssh installed on both the machines.

Can anyone tell the solution to this problem.

share|improve this question

migrated from Jun 27 '11 at 17:49

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

By "I have ssh installed on both machines", did you mean, that you installed the ssh server on one and an ssh client on the other machine? – KingCrunch Jun 27 '11 at 17:34
You have to install/start ssh server on the machine you are want to connect to. – pajton Jun 27 '11 at 17:34
This is off-topic for StackOverflow as it doesn't have anything to do with programming. It's better placed on ServerFault or SuperUser. – CanSpice Jun 27 '11 at 17:37

Make sure you have start sshd service.

service  sshd start
share|improve this answer
It seems there was some problem with the installing part only. I re installed it and now it works properly. – Vishal Jun 27 '11 at 17:41
ok. nice , your problem is solved. This site is for programming question only . If you have setup or server config question please use appropriate site from ServerFault or SuperUser – Vivek Goel Jun 27 '11 at 17:42
Sorry for inappropriate question. Will take care in future. – Vishal Jun 27 '11 at 17:44

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.