Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 192.168.1.2
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 192.168.1.2 [192.168.1.2] port 22.
debug1: connect to address 192.168.1.2 port 22: Connection refused

ssh: connect to host 192.168.1.2 port 22: Connection refused

share|improve this question

3 Answers 3

You have to install openssh-server on the machine you want connect to. If 192.168.1.2 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 192.168.1.2, open port 22.

Then try it again.

share|improve this answer

Install open-ssh on 192.168.1.2. 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

 
discard

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.