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.

  • Please check this: askubuntu.com/a/104768/9701 for connection refuse issue.
    – Achu
    Dec 6, 2012 at 17:41
  • This too askubuntu.com/a/141415/9701
    – Achu
    Dec 6, 2012 at 17:42
  • 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, 2012 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, 2012 at 18:15

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.