I can't establish a ssh connection to my server

Posted March 7, 2014 14.9k views
as the title said: I try to execute the command $ nc -w 10 22 && echo true || echo false and I got false

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers
I'm able to connect to port 22 on Is it still not working for you?
Your system appears up and responding to ssh connections
$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=57 time=76.0 ms
64 bytes from icmp_req=2 ttl=57 time=75.8 ms
64 bytes from icmp_req=3 ttl=57 time=76.1 ms
64 bytes from icmp_req=4 ttl=57 time=75.6 ms
--- ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 75.653/75.941/76.140/0.189 ms
$ nmap

Starting Nmap 5.21 ( ) at 2014-03-07 18:10 EST
Nmap scan report for (
Host is up (0.075s latency).
Not shown: 999 closed ports
22/tcp open ssh

Nmap done: 1 IP address (1 host up) scanned in 1.53 seconds
$ ncat 22 && echo true || echo false
$ ssh
The authenticity of host ' (' can't be established.
RSA key fingerprint is cc:70:82:29:42:b6:e1:92:6a:0b:61:7b:c9:7a:7f:2a.
Are you sure you want to continue connecting (yes/no)?
I am also having this exact issue. I am doing ssh in windows through cygwin. Also tried it through Chrome ssh extension.

Response from cygwin

$ ssh root@ -p 22
Could not create directory '/home/admin/.ssh'.
The authenticity of host ' (' can't be established.
ECDSA key fingerprint is 30:b3:9b:12:d5:f2:bd:30:a7:61:7b:c5:d7:50:22:82.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/admin/.ssh/known_hosts).
root@'s password:
Connection closed by

Response from chrome
Welcome to Secure Shell version 0.8.26.
Answers to Frequently Asked Questions:
[Pro Tip] Use 'Open as Window' to keep Control-W from closing your terminal!
[Pro Tip] See for more information.
Connecting to root@
Loading NaCl plugin... done.
Connection closed by UNKNOWN
NaCl plugin exited with status code 255.
(R)econnect, (C)hoose another connection, or E(x)it?

Please let me know the issue here.

@mrityunjaya.shukla: See, does that fix it?

I'm able to connect to your server. Are you sure you set up your SSH key properly? Check out