Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried to SSH to my new ubuntu 12 installation but got connection failure. I did a network trace and TCP 3-way handshake was RST by this ubuntu host. Looks like port 22 is closed. May i know what was preventing my connection? Firewall settings or something else and how to make the port open.

thank you!

share|improve this question
Please provide some more information: eg. - Has this worked in the past or is this the first access attempt - Network config: inside home network, from work to home, is there a router with port forwarding in the middle? - can you ssh localy on the machine to 127.o.o.1 or localhost - and any other information you can think of that is related –  nick Oct 23 '12 at 8:05
1. first attempt 2. I can ping the ubuntu box 3. #ssh localhost got connection refused –  zhoucengchao Oct 23 '12 at 8:16
Stop the ssh server service: sudo service ssh stop and run the ssh server manually in debug mode sudo /usr/sbin/sshd -p 22 -D -d -e and see what happens. –  phoibos Oct 23 '12 at 9:25
#service ssh stop -> unrecognized service. So looks like the ssh service is not running. This is because i didn't install ssh. After apt-get install ssh, everything works fine. –  zhoucengchao Oct 23 '12 at 12:04
Did you install openssh-server on the machine you are trying to connect too? (Sorry if I offended you with this question :P) –  Gerhard Burger Oct 23 '12 at 20:01
show 1 more comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.