Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 using this command:

userA :~$ sudo ssh userB@ 

It says ssh: connect to host port 22: connection refused.

I want to login remote & this is not working. In a forum they said that if in the file /etc/ssh/sshd_config if i change it to port 2222 it would work, but its still not working.

After this i want to transfer some of my media files to other laptop. Can anyone help me with that too? Thank you.

PS: I am using Ubuntu Maverick and he is on 12.04.

share|improve this question
Please check this: for connection refuse issue. – Achu Dec 6 '12 at 17:41
This too – Achu Dec 6 '12 at 17:42
thank you. It worked. :) – thanmai Dec 6 '12 at 18:02
Good to hear that. Which one solved the problem? Can you post your solution as answer here and accept it? It will help others faced the same issue ;) – Achu Dec 6 '12 at 18:07
It says i can aceept my own answer in two days. so in two days i'll do it. – thanmai Dec 6 '12 at 18:15
up vote 1 down vote accepted

I had not installed openssh-server on my laptop.

sudo apt-get install openssh-server

should do the trick, also make sure that openssh-server is installed on all the systems you are trying to login to.

share|improve this answer

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.