Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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 10.0.0.9 ([10.0.0.9]: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 10.0.0.9 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?

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

3 Answers 3

You may want to nmap it first, to see if it has an open port - just run nmap -A 10.0.0.9 - where 10.0.0.9 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 192.168.1.7

Starting Nmap 6.40 ( http://nmap.org ) at 2013-11-24 12:32 GMT
Nmap scan report for 192.168.1.7
Host is up (0.021s latency).
Not shown: 994 closed ports
PORT     STATE SERVICE    VERSION
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 ~]$ 
share|improve this answer
    
Given the log in the question, there is an SSH server listening on that port, and authentication succeeded. The problem comes after that. –  Gilles Nov 24 '13 at 21:04

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.

share|improve this answer

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 ;)

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.