PhilippC / keepass2android

Password manager app for Android
https://play.google.com/store/apps/details?id=keepass2android.keepass2android
GNU General Public License v3.0
4.62k stars 379 forks source link

Suddenly saving passwords in ssh-accessed database silently fails #2170

Open dstromberg opened 1 year ago

dstromberg commented 1 year ago

I've been using keepass2android for years, with great luck.

However recently, when I create a new password entry, the new entry doesn't appear to be getting saved to my remote ssh server.

I'm guessing this because I created an entry a couple of days ago in keepass2android, but was unable to Search for it or pick it by Name after sorting today.

So I recreated the entry today in keepass2android, and found that I still couldn't pull it up inside same, just minutes after creating it.

On the ssh server itself, I'm seeing:

$ stat keepass2.kdbx 
below cmd output started 2022 Fri Dec 30 01:26:18 PM PST
  File: keepass2.kdbx
  Size: 293982      Blocks: 576        IO Block: 4096   regular file
Device: 801h/2049d  Inode: 259254      Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1002/dstromberg)   Gid: ( 1003/dstromberg)
Access: 2022-12-24 19:09:05.563282929 -0800
Modify: 2022-12-24 16:53:27.860004643 -0800
Change: 2022-12-24 16:53:27.940009708 -0800
 Birth: -

IOW, it hasn't been updated in 6 days.

I dug around in the keepass2android menus a bit, and didn't see anything about ssh in them. The source code had plenty of hits on 'ssh' though.

I'm using keepass2android 1.09c-r0 on Android Android 13 (Build number TP1A.221105.002) to talk to OpenSSH_7.6p1 on Ubuntu 18.04.6 LTS.

What do I need to do to restore this functionality?

Thanks!

dstromberg commented 1 year ago

Is it safe to attach a debug log here?

jonathan-g commented 1 year ago

I suspect this may be related to #1812. Keepass2Android uses RSA keys for SSH, which are now disabled by default on many sshd distributions.

Fixing this may require waiting until Keepass2Android is updated to use more secure SSH keys, such as ED_ID25519 or ECDSA or alternately, editing the configuration in /etc/ssh/sshd_config to allow RSA keys.