Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have two pcs on a LAN. I can connect from one to the other using ssh, but not the other way. I get

ssh -vv
OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to [] port 22.
debug1: connect to address port 22: Connection refused

ssh: connect to host port 22: Connection refused

share|improve this question

You have to install openssh-server on the machine you want connect to. If is also an Debian or Ubuntu, this can be done like this: aptitude install openssh-server (you have to be root for this, or do: sudo aptitude install openssh-server if you use an ubuntu without root-account). If you are using a firewall on, open port 22.

Then try it again.

share|improve this answer

Install open-ssh on Open 22 port, if it is closed.

share|improve this answer

what tdeutsch have said +

Remember to check /etc/hosts.{allow,deny} files.

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.