Live data from Hacker News

Dropbear SSH, a lightweight alternative to OpenSSH

librebyte.net

61–70 of 110 posts

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#61
post #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?

Short answer: yes

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#62

A word of caution: Many (most) IRC spambot detectors check if your connecting IP is also running a Dropbear SSHd service. This can cause you to be k-lined in some instances, and it's not immediately obvious to basically everyone why the anti-spambot bots are flagging your connection. Of course, this isn't Dropbear SSHd's fault. Just something you might want to keep in mind if you use both of these things.

It is because dropbear is very common in embedded systems. They are commonly riddled with vulnerabilities, so they are getting hacked almost as soon as they are publicly reachable. This is not because of dropbear, but because they are typically configured with weak credentials that are newer changed. I guess IRC servers see a lot of spam from such devices, so they just drop all systems which has dropbear.

It's probably also because of dropbear since embedded devices often run old versions and dropbear seemed to be vulnerable to severe vulnerabilities in the past:

https://www.cvedetails.com/vulnerability-list/vendor_id-1580...

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#63
post #59
post #52

Earlier quoted context omitted.

Currently, all my remote servers of any import use LUKS to encrypt the PVs. My /boot is a tiny unencrypted filesystem containing just the kernel, and an initrd, which prompts for my decryption key before booting. (afaict, the standard setup) For remote servers, I reboot them and then have to use a serial console to type in the LUKS password. Are you saying that with this, I could put an ssh server in the initrd (and…

Yes you can and start whatever program you want, take i look at better-initramfs ( https://github.com/slashbeast/better-initramfs ), although it is more for gentoo/funtoo. Basicaly when linux boot from initrd it starts "/init" executable and chroots to your system (ok, it is using pivot_root and it is slightly more complex), but idea it is same as manually mounting filesystems and doing chroot then starting executabl…

There's also an example script on the Gentoo wiki that might serve as a good starting point: https://wiki.gentoo.org/wiki/Custom_Initramfs/Examples#Simpl...

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#64

Earlier quoted context omitted.

Since the phone's IP address can be expected to change, you can't really use that to choose the right key to present, or to verify the host fingerprint right?. How do you work around this?

You can set a static IP in your wireless settings.

Not all routers support this. In fact at work we've got a router that seems to black-hole anything whose source or destination isn't in the DHCP table (TP-Link 480t+).

In the end I solved this by accessing this only while I'm tethered, that fixes the phone's IP address.

Too bad there doesn't seem to be an option to select keys according to host key instead of hostname or alias.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#65
post #55
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.

It's somewhat flaky, but you can also mount your phone as a local FS over USB debugging, requires a wired connection though: https://github.com/spion/adbfs-rootless

It's possible on most devices to use adb over the network. It's a separate toggle in the de developer settings as it exposes the adb port to all network interfaces (think WiFi, LTE, Bluetooth, etc.) Use `adb connect ` to connect to your device over WiFi and you should be able to use this tool without having a wired connection to the phone.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#66
post #31

Earlier quoted context omitted.

Is there an equivalent for iOS?

Lol

Let’s keep in mind the user story: “Being able to wirelessly perform an incremental backup of all your photos and data is life-changing”

The LOL is telling your Mom about DropbearSSH when this is now how iCloud Photos and Files just works. The equivalent goal is baked in.

You can still use cables or local WiFi via iTunes, but now all media and files sync over-the-air as files, along with an incremental backup of all state.

For the first time in last fall’s iPhone hardware upgrade, I didn’t use a wired backup/restore and every app’s and settings worked, along with device config. I’ve had an iPad Pro unexpectedly need replacing, no wired backup/restore needed. All my stuff syncs across all devices including desktop, all ambiently available.

The life changing part is confidence it’s working to the point of not having to think about it any more.

// Note: Photos and media end up as originals on Mac, along with all files. Those all backup in turn to Backblaze, for loss scenarios not covered by rsync style replication.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#67
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.

What do you use to have rsync on your phone?

And did you have to root your phone to achieve any of this?

Also, is there a tool to use duckdns or similar to assign a hostname to your phone?

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#68

A word of caution: Many (most) IRC spambot detectors check if your connecting IP is also running a Dropbear SSHd service. This can cause you to be k-lined in some instances, and it's not immediately obvious to basically everyone why the anti-spambot bots are flagging your connection. Of course, this isn't Dropbear SSHd's fault. Just something you might want to keep in mind if you use both of these things.

Huh, what kind of dodgy IRC servers have you been on ;) ? I've never encountered that in years of IRCing from hosts running Dropbear, though I could see it happening.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#69
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 acrosync, a rsync UI, pretty limited but works... I'm gonna try your sshd to see if it's better.

Re: Dropbear SSH, a lightweight alternative to OpenSSH

#70
post #52
post #9

Dropbear works well for preboot LUKS unlocking with remote servers.

Currently, all my remote servers of any import use LUKS to encrypt the PVs. My /boot is a tiny unencrypted filesystem containing just the kernel, and an initrd, which prompts for my decryption key before booting. (afaict, the standard setup) For remote servers, I reboot them and then have to use a serial console to type in the LUKS password. Are you saying that with this, I could put an ssh server in the initrd (and…

For Ubuntu or Debian the dropbear-initramfs package should handle most of it, it looks like https://hamy.io/post/0005/remote-unlocking-of-luks-encrypted... is an alright run through.

Another approach is to use something like OpenWRT as a bootloader then pivot_root into the real distribution after unlocking it - not sure there are any good instructions online for that though. I'm using it on a Raspberry Pi colocated 14000km away for https://dropbear.nl, it works pretty well. Kexec is great for remote kernel upgrades too.

Post reply on HN