Live data from Hacker News

Dropbear SSH, a lightweight alternative to OpenSSH

librebyte.net

41–50 of 110 posts

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#41
post #8

I use an ad-free, open-source Android app called SimpleSSHD that implements a Dropbear SSH server. Being able to SSH into your phone and wirelessly perform an incremental rsync backup of all your photos and data is life-changing compared to the hell that is cables and the MTP protocol. Thank you to all these projects for delivering me from the clutches of MTP, I am indebted.

A long time ago, when I tried something like that, I was stymied because the SSH server did not have permissions to write to any directory which the document readers etc. could see. Is this sort of thing still a problem? How did you get around it?

If your phone is rooted, you can use e.g. Linux Deploy to install a full Linux distribution. Then, you can set up regular ol' OpenSSH, mount /sys and /data under the Linux chroot, and rsync as usual.

I use this method to rsync to btrfs snapshots (+ raw copies of non-filesystem partitions) to make daily incremental backups of the entire phone. (Restoring said backups is a bit more involved, but I verified it's doable.)

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#42
post #19
post #7

Earlier quoted context omitted.

Nginx won because it was faster, simpler and more easily extended, not because it was "lightweight" per se. In comparison, dropbear doesn't really do anything that ssh doesn't, and lags in a bunch of esoteric features that "most" people don't use but that inevitably some people do. Who wants to use a distro where one's preferred ssh-agent feature or X11 forwarding inexplicably doesn't work? Dropbear is small and buil…

Dropbear author here. It used to have one unique feature, but OpenSSH has copied it now[0] :) dbclient host1,host2,user@host3 to onion-TCP-forward through a few hosts. [0] https://manpages.debian.org/stretch/openssh-client/ssh.1.en....

Hey! I love Dropbear for embedded! Sending you a long-distance highfive!

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#43
post #8

I use an ad-free, open-source Android app called SimpleSSHD that implements a Dropbear SSH server. Being able to SSH into your phone and wirelessly perform an incremental rsync backup of all your photos and data is life-changing compared to the hell that is cables and the MTP protocol. Thank you to all these projects for delivering me from the clutches of MTP, I am indebted.

Is there an equivalent for iOS?

For non-jailbroken devices that wouldn't be possible in the same way, but an app could certainly implement SSH with libraries (photos, contacts, etc) exposed as a filesystem and interpret a set of commands (like rsync).

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#44
post #8

I use an ad-free, open-source Android app called SimpleSSHD that implements a Dropbear SSH server. Being able to SSH into your phone and wirelessly perform an incremental rsync backup of all your photos and data is life-changing compared to the hell that is cables and the MTP protocol. Thank you to all these projects for delivering me from the clutches of MTP, I am indebted.

Great idea, I'd grown too reliant on Google Photos and always hated that. I should set this up.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#45
post #8

I use an ad-free, open-source Android app called SimpleSSHD that implements a Dropbear SSH server. Being able to SSH into your phone and wirelessly perform an incremental rsync backup of all your photos and data is life-changing compared to the hell that is cables and the MTP protocol. Thank you to all these projects for delivering me from the clutches of MTP, I am indebted.

I use the Syncopoli app which can do this on a scheduled basis. It uses Dropbear internally and is also on F-Droid. You do need a SSH server but you can limit the wireless networks it syncs on, so it needn't be public.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#47
post #3

Very common in embedded devices. This link isn't working at the moment, so here's a link to the actual project: https://matt.ucc.asn.au/dropbear/dropbear.html

I followed that literarary-clock kindle tutorial at the weekend, and I think dropbear was the SSH client the networking hack used. Makes sense if it's designed to be low-resource.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#48
post #8

I use an ad-free, open-source Android app called SimpleSSHD that implements a Dropbear SSH server. Being able to SSH into your phone and wirelessly perform an incremental rsync backup of all your photos and data is life-changing compared to the hell that is cables and the MTP protocol. Thank you to all these projects for delivering me from the clutches of MTP, I am indebted.

A long time ago, when I tried something like that, I was stymied because the SSH server did not have permissions to write to any directory which the document readers etc. could see. Is this sort of thing still a problem? How did you get around it?

I haven't used SimpleSSHD but I use Termux, which gives me a "normal" terminal (no root required).

Since Android 8 I've lost write access to general locations in the sd-card but I still have read access, as well as read+write on the internal storage.

It has an ssh server which can be nice if you want to edit some files on the phone remotely but that's not needed for rsync. I have a shortcut on the home screen which triggers a script that runs an rsync command for photos and other stuff I want to backup. Also use it to reverse-sync a folder from my NAS, want to send a file to the phone? But the file in that folder and run the script.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#49
post #8

I use an ad-free, open-source Android app called SimpleSSHD that implements a Dropbear SSH server. Being able to SSH into your phone and wirelessly perform an incremental rsync backup of all your photos and data is life-changing compared to the hell that is cables and the MTP protocol. Thank you to all these projects for delivering me from the clutches of MTP, I am indebted.

With Android now restricting background services, will this continue to work in the future?

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#50
post #48

Earlier quoted context omitted.

A long time ago, when I tried something like that, I was stymied because the SSH server did not have permissions to write to any directory which the document readers etc. could see. Is this sort of thing still a problem? How did you get around it?

I haven't used SimpleSSHD but I use Termux, which gives me a "normal" terminal (no root required). Since Android 8 I've lost write access to general locations in the sd-card but I still have read access, as well as read+write on the internal storage. It has an ssh server which can be nice if you want to edit some files on the phone remotely but that's not needed for rsync. I have a shortcut on the home screen which t…

I think that you need to run the command "termux-setup-storage" to be able to r/w again:

https://wiki.termux.com/wiki/Termux-setup-storage

Post reply on HN