I can't establish a ssh connection to my server

March 7, 2014 8.1k views
as the title said: I try to execute the command $ nc -w 10 22 && echo true || echo false and I got false
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 ( http://nmap.org ) at 2014-03-07 18:10 EST
Nmap scan report for charmingwho.info (
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: http://goo.gl/TK7876
[Pro Tip] Use 'Open as Window' to keep Control-W from closing your terminal!
[Pro Tip] See http://goo.gl/TK7876 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 http://ekawas.blogspot.com/2007/03/solving-pesky-ssh-issues-in-cygwin.html, does that fix it?

I'm able to connect to your server. Are you sure you set up your SSH key properly? Check out https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys--2.
by Etel Sverdlov
SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. With SSH keys, users can log into a server without a password. This tutorial explains how to generate, use, and upload an SSH Key Pair.
Have another answer? Share your knowledge.