[APP][2.1+] SSHDroid (2.1.0)

Search This thread

berserker_devel

Inactive Recognized Developer
Jan 20, 2011
367
266
Exactly the same

Code:
simon@TheBorg ~ $ adb shell
/data/data/berserker.android.apps.sshdroid/dropbear/dropbear.banner -v 2> '/sdcard/dropbear_log.txt'               <
127|shell@android:/ $ exit
simon@TheBorg ~ $ adb pull /sdcard/dropbear_log.txt  
1 KB/s (89 bytes in 0.083s)
simon@TheBorg ~ $ cat dropbear_log.txt 
/system/bin/sh: /data/data/berserker.android.apps.sshdroid/dropbear/dropbeard: not found

Please try the following commands so that I can see what is not working:
Code:
adb shell
cd /data/data/berserker.android.apps.sshdroid
ls -la
cd dropbear
ls -la
umask
su
umask
 

Kangburra

Senior Member
Sep 7, 2007
2,361
665
Please try the following commands so that I can see what is not working:
Code:
adb shell
cd /data/data/berserker.android.apps.sshdroid
ls -la
cd dropbear
ls -la
umask
su
umask

I am quoting the whole terminal as some of it failed due to permissions.



Code:
adb shell
shell@android:/ $ cd /data/data/berserker.android.apps.sshdroid
shell@android:/data/data/berserker.android.apps.sshdroid $ ls -la
opendir failed, Permission denied
255|shell@android:/data/data/berserker.android.apps.sshdroid $ cd dropbear
/system/bin/sh: cd: /data/data/berserker.android.apps.sshdroid/dropbear: Permission denied
2|shell@android:/data/data/berserker.android.apps.sshdroid $ umask
000
shell@android:/data/data/berserker.android.apps.sshdroid $ su
root@android:/data/data/berserker.android.apps.sshdroid # ls -la
drwxrwx--x u0_a5    u0_a5             2013-09-04 12:51 cache
drwx------ u0_a5    u0_a5             2013-09-05 20:39 dropbear
drwx------ u0_a5    u0_a5             2013-09-05 14:16 home
lrwxrwxrwx install  install           2013-09-04 12:51 lib -> /data/app-lib/berserker.android.apps.sshdroid-1
drwxrwx--x u0_a5    u0_a5             2013-09-05 14:16 shared_prefs
 dropbear/                                                                    <
root@android:/data/data/berserker.android.apps.sshdroid/dropbear # ls -la
-rwxr-xr-x u0_a5    u0_a5      731072 2013-09-04 12:51 busybox
-rwxr-xr-x u0_a5    u0_a5          97 2013-09-05 20:26 dropbear
-rw------- u0_a5    u0_a5          60 2013-09-04 12:51 dropbear.banner
-rw------- u0_a5    u0_a5         458 2013-09-04 12:51 dropbear.key.dss
-rw------- u0_a5    u0_a5         427 2013-09-04 12:51 dropbear.key.rsa
-rw------- u0_a5    u0_a5           3 2013-09-04 12:51 dropbear.version
-rwxr-xr-x u0_a5    u0_a5       34132 2013-09-04 12:51 dropbearconvert
-rwxr-xr-x u0_a5    u0_a5      165832 2013-09-04 12:51 dropbeard
-rwxr-xr-x u0_a5    u0_a5       46420 2013-09-04 12:51 dropbearkey
-rw------- u0_a5    u0_a5           0 2013-09-05 20:39 log
-rwxr-xr-x u0_a5    u0_a5       25944 2013-09-04 12:51 scp
-rwxr-xr-x u0_a5    u0_a5       38384 2013-09-04 12:51 sftp-server
-rwxr-xr-x u0_a5    u0_a5      153508 2013-09-04 12:51 ssh
root@android:/data/data/berserker.android.apps.sshdroid/dropbear # umask
000
root@android:/data/data/berserker.android.apps.sshdroid/dropbear #
 

berserker_devel

Inactive Recognized Developer
Jan 20, 2011
367
266
I am quoting the whole terminal as some of it failed due to permissions.
Thanks!
Please try the following:
Code:
adb shell
su
cd /data/data/berserker.android.apps.sshdroid/dropbear
chmod 666 dropbear.*
After these commands please can you run again the previous commands to execute manually dropbear in root mode?
 

Kangburra

Senior Member
Sep 7, 2007
2,361
665
Thanks!
Please try the following:
Code:
adb shell
su
cd /data/data/berserker.android.apps.sshdroid/dropbear
chmod 666 dropbear.*
After these commands please can you run again the previous commands to execute manually dropbear in root mode?

Code:
shell@android:/ $ su
root@android:/ # cd /data/data/berserker.android.apps.sshdroid/dropbear
pbear*                                                                        <
root@android:/data/data/berserker.android.apps.sshdroid/dropbear # ls -al
-rwxr-xr-x u0_a5    u0_a5      731072 2013-09-04 12:51 busybox
-rw-rw-rw- u0_a5    u0_a5          97 2013-09-05 20:26 dropbear
-rw-rw-rw- u0_a5    u0_a5          60 2013-09-04 12:51 dropbear.banner
-rw-rw-rw- u0_a5    u0_a5         458 2013-09-04 12:51 dropbear.key.dss
-rw-rw-rw- u0_a5    u0_a5         427 2013-09-04 12:51 dropbear.key.rsa
-rw-rw-rw- u0_a5    u0_a5           3 2013-09-04 12:51 dropbear.version
-rw-rw-rw- u0_a5    u0_a5       34132 2013-09-04 12:51 dropbearconvert
-rw-rw-rw- u0_a5    u0_a5      165832 2013-09-04 12:51 dropbeard
-rw-rw-rw- u0_a5    u0_a5       46420 2013-09-04 12:51 dropbearkey
-rw------- u0_a5    u0_a5           0 2013-09-05 20:39 log
-rwxr-xr-x u0_a5    u0_a5       25944 2013-09-04 12:51 scp
-rwxr-xr-x u0_a5    u0_a5       38384 2013-09-04 12:51 sftp-server
-rwxr-xr-x u0_a5    u0_a5      153508 2013-09-04 12:51 ssh

Code:
ndroid.apps.sshdroid/dropbear/                                                <
pbear                                                                         <
sh: ./dropbear: can't execute: Permission denied
eard                                                                          <
sh: ./dropbeard: can't execute: Permission denied

I set them to 666 and then tried to execute, and it should fail, and it did.
 

berserker_devel

Inactive Recognized Developer
Jan 20, 2011
367
266
Code:
shell@android:/ $ su
root@android:/ # cd /data/data/berserker.android.apps.sshdroid/dropbear
pbear*                                                                        <
root@android:/data/data/berserker.android.apps.sshdroid/dropbear # ls -al
-rwxr-xr-x u0_a5    u0_a5      731072 2013-09-04 12:51 busybox
-rw-rw-rw- u0_a5    u0_a5          97 2013-09-05 20:26 dropbear
-rw-rw-rw- u0_a5    u0_a5          60 2013-09-04 12:51 dropbear.banner
-rw-rw-rw- u0_a5    u0_a5         458 2013-09-04 12:51 dropbear.key.dss
-rw-rw-rw- u0_a5    u0_a5         427 2013-09-04 12:51 dropbear.key.rsa
-rw-rw-rw- u0_a5    u0_a5           3 2013-09-04 12:51 dropbear.version
-rw-rw-rw- u0_a5    u0_a5       34132 2013-09-04 12:51 dropbearconvert
-rw-rw-rw- u0_a5    u0_a5      165832 2013-09-04 12:51 dropbeard
-rw-rw-rw- u0_a5    u0_a5       46420 2013-09-04 12:51 dropbearkey
-rw------- u0_a5    u0_a5           0 2013-09-05 20:39 log
-rwxr-xr-x u0_a5    u0_a5       25944 2013-09-04 12:51 scp
-rwxr-xr-x u0_a5    u0_a5       38384 2013-09-04 12:51 sftp-server
-rwxr-xr-x u0_a5    u0_a5      153508 2013-09-04 12:51 ssh

Code:
ndroid.apps.sshdroid/dropbear/                                                <
pbear                                                                         <
sh: ./dropbear: can't execute: Permission denied
eard                                                                          <
sh: ./dropbeard: can't execute: Permission denied

I set them to 666 and then tried to execute, and it should fail, and it did.
Not really :)
You forgot the dot after dropbear, the command should be:
Code:
chmod 666 dropbear.*
Please note the dot after dropbear :D

P.S.: I suggest to uninstall/reinstall the application to fix the permissions (you haven't now execution permission on the executable "dropbeard")
 

Kangburra

Senior Member
Sep 7, 2007
2,361
665
Not really :)
You forgot the dot after dropbear, the command should be:
Code:
chmod 666 dropbear.*
Please note the dot after dropbear :D

P.S.: I suggest to uninstall/reinstall the application to fix the permissions (you haven't now execution permission on the executable "dropbeard")

Oops, yes, you're right. I uninstalled and re-installed then did the chmod as shown below.

I tried to log in and attach the log for running as root.

Code:
root@android:/data/data/berserker.android.apps.sshdroid/dropbear # ll
-rwxr-xr-x u0_a5    u0_a5      731072 2013-09-06 18:32 busybox
-rwxr-xr-x u0_a5    u0_a5          93 2013-09-06 18:32 dropbear
-rw-rw-rw- u0_a5    u0_a5          60 2013-09-06 18:32 dropbear.banner
-rw-rw-rw- u0_a5    u0_a5         457 2013-09-06 18:32 dropbear.key.dss
-rw-rw-rw- u0_a5    u0_a5         426 2013-09-06 18:32 dropbear.key.rsa
-rw-rw-rw- u0_a5    u0_a5           6 2013-09-06 18:32 dropbear.pid
-rw-rw-rw- u0_a5    u0_a5           3 2013-09-06 18:32 dropbear.version
-rwxr-xr-x u0_a5    u0_a5       34132 2013-09-06 18:32 dropbearconvert
-rwxr-xr-x u0_a5    u0_a5      165832 2013-09-06 18:32 dropbeard
-rwxr-xr-x u0_a5    u0_a5       46420 2013-09-06 18:32 dropbearkey
-rw------- u0_a5    u0_a5           0 2013-09-06 18:32 log
-rwxr-xr-x u0_a5    u0_a5       25944 2013-09-06 18:32 scp
-rwxr-xr-x u0_a5    u0_a5       38384 2013-09-06 18:32 sftp-server
-rwxr-xr-x u0_a5    u0_a5      153508 2013-09-06 18:32 ssh
 

Attachments

  • dropbear_log_root.txt
    21.7 KB · Views: 12

berserker_devel

Inactive Recognized Developer
Jan 20, 2011
367
266
Oops, yes, you're right. I uninstalled and re-installed then did the chmod as shown below.

I tried to log in and attach the log for running as root.
I published a new beta with some small changes in the dropbear binary (no other new features by now), please can you test it again?
Thanks!
 

Kangburra

Senior Member
Sep 7, 2007
2,361
665
I published a new beta with some small changes in the dropbear binary (no other new features by now), please can you test it again?
Thanks!

Code:
$ ssh root@192.168.7.222
SSHDroid
Use 'root' as username
Default password is 'admin'
root@192.168.7.222's password: 
[11644] Sep 07 08:52:53 Exit (root): Child failed
Connection to 192.168.7.222 closed.

I gave it root permissions when it first asked, as I guess most users would. Sorry. :eek:

---------- Post added at 08:58 AM ---------- Previous post was at 08:54 AM ----------

In addition I can get it to work at all now.
If I deny root the server stops.
If I allow root I get the child failed error.
 

Kangburra

Senior Member
Sep 7, 2007
2,361
665
More testing, if I change the port to 2222 and chmod 666 /data/data/bers.../dropbear/dropbear.*
I can log in without root permissions and then I can su allowing the prompt it shows.

So this seems at least as good as the last one.
 

JaHIY

Member
Aug 13, 2011
18
3
I found SSHDroid 1.9.7 beta2 sometimes would lost INFO (Wifi Connection, Address and Status)…
 

my-blue-snog-box

Senior Member
Aug 5, 2013
424
292
Frostburg, MD
I'm on the AT&T S4 Active (I537) running 4.2.2 GPE ROM through SafeStrap. The client won't connect for me...I will try to start and it will turn on for a fraction of a second and then turn right back off...

_____________________
Find me on Hangouts
If I helped you, please hit the "Thanks" button.
 

my-blue-snog-box

Senior Member
Aug 5, 2013
424
292
Frostburg, MD
What about the log?


P.S.: are you on "beta" version right?

y6equryq.jpg


_____________________
Find me on Hangouts
If I helped you, please hit the "Thanks" button.
 

78Staff

Senior Member
Sep 26, 2007
1,526
457
Cosmo, Fl
Code:
$ ssh root@192.168.7.222
SSHDroid
Use 'root' as username
Default password is 'admin'
root@192.168.7.222's password: 
[11644] Sep 07 08:52:53 Exit (root): Child failed
Connection to 192.168.7.222 closed.

I gave it root permissions when it first asked, as I guess most users would. Sorry. :eek:

---------- Post added at 08:58 AM ---------- Previous post was at 08:54 AM ----------

In addition I can't get it to work at all now.
If I deny root the server stops.
If I allow root I get the child failed error.


I'm not sure where we landed on this, but have upgraded to an S4 with 4.2.2 and both SSHDroidPro and the SSHDroid Beta are returning the above error :(. I've run through all the troubleshooting steps to no avail. I am noticing I never get a dropbeard file, even though the applicaiton is running. Any suggestions?
 

78Staff

Senior Member
Sep 26, 2007
1,526
457
Cosmo, Fl
I'm not sure where we landed on this, but have upgraded to an S4 with 4.2.2 and both SSHDroidPro and the SSHDroid Beta are returning the above error :(. I've run through all the troubleshooting steps to no avail. I am noticing I never get a dropbeard file, even though the applicaiton is running. Any suggestions?


Also noting the same failure on other SSH apps (ie quickssh), but I was able to get an older one working on port 2222 - SSHelper - as a workaround until SSHDroid/SSHDroidPro is working again.

EDIT - I did get beta working on port 2222 eventually, by forgetting the app in SuperSU and then denying root.
 
Last edited:

Kangburra

Senior Member
Sep 7, 2007
2,361
665
Also noting the same failure on other SSH apps (ie quickssh), but I was able to get an older one working on port 2222 - SSHelper - as a workaround until SSHDroid/SSHDroidPro is working again.

EDIT - I did get beta working on port 2222 eventually, by forgetting the app in SuperSU and then denying root.

Yes, port 22 seems to be a problem, and root user cannot run the app. I have been using this app reliably using this method, it's not automatic (yet) but it does work :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    SSHDroid is a SSH server for Android (more informations about SSH here).
    This application will let you to connect to your device from your PC and execute commands (like "terminal" and "adb shell") or edit files (through SFTP, WinSCP, Cyberduck, etc...).


    Windows users:
    - File Transfer: WinSCP.
    - Remote Shell: PuTTY

    Linux users:
    - File Transfer: natively supported by most file managers (like Nautilus or Dolphin), just enter the sftp address displayed as location.
    - Remote Shell: run 'ssh' from the terminal

    Mac users:
    - File Transfer: Cyberduck
    - Remote Shell: run 'ssh' from the terminal

    Root is supported (in particular if you need to execute it on the predefined SSH port that is 22) but not required.

    FAQs:
    • q: Why my transfer speed decrease when I turn off the screen?
      a: Enable the option 'Lock Wifi'. If your device is running at least Android 2.3.x, you should get full speed transfer even when the screen is off, otherwise enable the option 'Lock screen' too.
    • q: How can I use a shared key with Putty/Winscp?
      a: You have to generate a key from the application in OpenSSH format and use Puttygen to import/convert it in ppk format. A recent version of Puttygen (>= 0.61) is required!
    • q: How can I upgrade to the pro version?
      a: If you previously purchased SSHDroidPro on Google Play, the new version will automatically detect it and upgrade to pro otherwise you can unlock it as in-app purchase.
    • q: How can I automate the application start/stop?
      a: Use the following broadcast intents:
      • START: berserker.android.apps.sshdroid.command.START
      • STOP: berserker.android.apps.sshdroid.command.STOP

    SSHDroid on Google Play

    Changelog 2.1.0
    • rsync is now included in SSHDroid (sperimental build with libiconv support)
    • Fixed a problem with importing keys >= 2048 bit
    • Fixed a problem with in-app purchase restore
    • Google Play Services updated
    • Optimized layout for tablets
    • Minor UI changes
    Changelog 2.0.8
    • Chinese language updated
    • minor changes
    Changelog 2.0.7
    • fixed a bug on key import
    Changelog 2.0.6
    • minor changes
    Changelog 2.0.5
    • bugfix release
    Changelog 2.0.4
    • fixed an issue with the "path" (scp is back)
    • minor changes
    Changelog 2.0.3
    • fixed a bug with shared keys auth and homefolder
    • compatibility fixes for S4 and Note 3
    Changelog 2.0.2
    • fixed an issue with root permissions
    Changelog 2.0.1
    • fixed a bug in the initialization (Dialog not disappearing)
    • fixed the layout in the help (bottom links are now visible)
    • minor changes
    Changelog 2.0.0
    • complete UI rewrite!
    • sperimental x86/mips support
    • homescreen and lockscreen widget (pro)
    • WiFi autostart's white list (pro)
    • new option to allow app execution without root privileges (on rooted devices)
    • new option "autostart service"
    • new option to enable verbose logging
    • better home folder selection
    • better file picker
    • android.permission.ACCESS_SUPERUSER permission added
    • busybox updated to 1.21.0
    • no more adchecker (pro version has more features)
    Changelog 1.9.4
    • ICS compatibility fixes
    • Dropbear updated to 0.53.1 (SSH tunneling now works)
    • Busybox now supports DNS names resolution
    • Active connections are now closed correctly once the service is stopped
    • Special characters in the password are now supported
    Changelog 1.9.0
    • SSH keys management
    • Busybox updated to last stable release (1.18.5)
    • Custom shell profile option (add busybox binaries to the path with improved shell)
    • WiFi lock option
    • Application icon option
    • The main application icon can now be long pressed to toggle the SSH service (short press is supported too)
    • Login banner option
    • Port forwarding should now be fixed
    • Help updated
    • New translations: spanish, german and french
    • AdMob SDK updated (free version only)
    • AdChecker now allows to revert the hosts file (free version only)
    If you want to translate SSHDroid into a new language:
    • download the attached file (strings.zip)
    • edit the xml inside the zip (strings.xml) in this way:

      Original line:
      <string name="key_dialog_format">File format</string>
      Translated line:
      <string name="key_dialog_format">My translation of File format</string>
      Please do not translate anything inside the "name" attribute:
      <string name="do not translate this">
      But only:
      <string name="my_key">Please translate only this part</string>
    • Attach in this topic a modified version of the file or send me a pm with the download link (please remember to indicate the new language!)

    I'll be glad for every contribution :)

    Available translations:
    Use SSHDroid for Tethering !

    SSHDroid could be used for tethering purpose:
    • Doesn't require a separate tethering plan
    • Not blockable or detectable by carriers
    • Doesn't require root
    • Doesn't require to install additional software on your PC
    More info here.
    welg.png
    If you want to become a beta tester of this app please follow these steps:
    Support this project
    6
    Wow I've been copycatted ;)

    QuickSSHd ($1.50 USD)
    snap1.png
    quicksshd_small_qrcode.png

    http://www.appbrain.com/app/quicksshd/com.teslacoilsw.quicksshd

    Right down to the Help page
    quicksshd_help.png
    sshdroid_help.png


    I'm not going to make a big fuss as the core part (Dropbear), for both projects, is open source and we're both setup on github posting the modified sources which is good.
    QuickSSHd's dropbear's github: https://github.com/barryk/android_external_dropbear
    SSHDroid's dropbear's github: https://github.com/berserker/android_external_dropbear

    But I would appreciate it if you tried to differentiate a little more and wrote your own help page. The interfaces are also very similar, but that's at least a relatively natural interface for a program that controls an SSH Daemon and needs to provide information on such.

    -Kevin
    TeslaCoil Software
    5
    ...
    P.S.: the application is free

    I don't agree with the app being "free" if it's ad supported AND forces itself to quit if Ads are disabled on the phone (ie... via Ad killers like AdFree).

    I see you also have a 'Pro' version of the app for ~$1.30US, but now that there's a 15min only refund window, I was interested in trying out your software but I'm feeling a little "trapped" into having to either allow Ads or buy your app outright (no way any decent amount of testing can be done within 15min).

    Sorry, but for me, I'm going to pass.
    4
    I'm working on the "PIE" issue so please expect an update soon :good:
    4
    Setting Up Your Tasker Task

    The new version (just published in the play store) supports this feature.
    To start/stop the service you can fire the following broadcast intents:

    Free version:
    • start: berserker.android.apps.sshdroid.command.START
    • stop: berserker.android.apps.sshdroid.command.STOP
    Pro version:
    • start: berserker.android.apps.sshdroidpro.command.START
    • stop: berserker.android.apps.sshdroidpro.command.STOP

    Let me know if it works :)

    I had a couple of people ask me how I set this up in Tasker, so here it goes...

    1. Create a new Task (eg. Start SSHDroid) in Tasker
    2. Add a new action > Misc > Send Intent
    3. Set the action to berserker.android.apps.sshdroid.command.START , Cat = None, the rest you can leave as defaults
    4. Save the action and task
    5. Repeat for berserker.android.apps.sshdroid.command.STOP intent
    6. Create a profile to trigger the tasks (or launch w/ NFC or whatever you want)

    You can test the Task by clicking on the Task and clicking the Play icon in the lower right of the popup. It should start the server right away (Screenshot).

    Hope this helps!