Why is the SSH server not working on Android 4, are the ports being blocked? I am having difficulty ssh'ing into my new Android 4 (Samsung Nexus) phone.

I have installed various SSH Servers but in in all cases the ssh connection just hangs (i.e. I don't get as far as username/password).

As an example, using SSHDroid:

Verbose SSH log from my linux box :

joel@pepper ~ $ ssh  -p 2222 root@192.168.1.65 -vvv
OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.65 [192.168.1.65] port 2222.


The output from nmap does not look right. A status of filtered on the port implies a firewall is blocking it:

joel@pepper ~ $ sudo nmap -sS  192.168.1.65 

Starting Nmap 5.21 ( http://nmap.org ) at 2011-11-20 21:29 GMT
Nmap scan report for android-63731d6ebec9e01.lan (192.168.1.65)
Host is up (0.019s latency).
Not shown: 999 closed ports
PORT     STATE    SERVICE
2222/tcp filtered unknown
MAC Address: A0:0B:BA:B4:5F:59 (Unknown)
As far as I know, the default ssh port IS 22 on Ubuntu, just as "Lie Ryan" pointed out.  You might want to check your sshd_config files on your PC, if you want to take a look at this article, it specifies on how to change the default ssh configuration on Ubuntu--as well as the official documentation.  Beyond that, check your current firewall settings, you might be able to open that specific port temporarily to ssh-type service if you want to confirm that it's not something else.

Aside from that, it seems to me that this question was asked more than 6 months ago; if the OP hasn't figured it out by now, I doubt he'll be interested to pursue it further.  I suggest either accept an answer, provide update on the situation since, or perhaps close the question.

EDIT: depending on your android ssh-server app, and whether or not you're running it with su privileges, this is from the "QuickSSHD" website:


  non-root users are limited to ports &lt; 1024 and the QuickSSHd application user, which CAN read and write to the SD Card.