I am trying to use the ssh/sftp Daemon app on Android, and SSHing into the phone using an openssh client. Here is the verbose output I get right before the connection breaks

debug1: Authentication succeeded (password).
Authenticated to ([]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to closed.
Transferred: sent 3064, received 1088 bytes, in 0.2 seconds
Bytes per second: sent 19445.0, received 6904.7
debug1: Exit status -1

Anyone have any idea what the above output means, and if so, whether there's anything I can do client-side to fix this?

  • The name of the app is "ssh/sftp Daemon"
    – merlin2011
    Nov 25, 2013 at 6:11
  • 1
    What command did you run, and what ssh are you using on your client-side?
    – Wilf
    Nov 25, 2013 at 13:44

3 Answers 3


The connection is closed after authentication, so there's probably something wrong that's related to your account. A likely reason is that the shell for your account doesn't exist, or that the server is configured not to allow shell access.

There are multiple Android apps that provide an SSH server, and you don't say which one you're using. Maybe it only opens SFTP by default and not a command line, or maybe you misconfigured your account.

Whatever the reason is, it's unlikely that you can do anything from the client side, apart from trying SFTP.


I had problems connecting with ssh to my android phone. I unlocked the screen and then it worked. It seems like android lockscreen is very secure ;)


You may want to nmap it first, to see if it has an open port - just run nmap -A - where is your Android's IP address. I usually use this to check on my Raspberry Pi.

For installing nmap if you don't have it - see here http://nmap.org/book/install.html

By the way, here is the nmap output form from my printer so you know what to expect - look for ssh under SERVICE.

[wilf@comp ~]$ nmap -A

Starting Nmap 6.40 ( http://nmap.org ) at 2013-11-24 12:32 GMT
Nmap scan report for
Host is up (0.021s latency).
Not shown: 994 closed ports
21/tcp   open  ftp        Brother/HP printer ftpd 1.13
|_ftp-anon: Anonymous FTP login allowed (FTP code 230)
23/tcp   open  telnet     Brother/HP printer telnetd
80/tcp   open  http?
515/tcp  open  printer
631/tcp  open  ipp?
9100/tcp open  jetdirect?
Service Info: Device: printer

Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 148.42 seconds
[wilf@comp ~]$ 
  • Given the log in the question, there is an SSH server listening on that port, and authentication succeeded. The problem comes after that. Nov 24, 2013 at 21:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .