Bug 507578 - SSHFS Filesystem expose plugin fails to reconnect properly, requiring force-stop/restart to resolve
Summary: SSHFS Filesystem expose plugin fails to reconnect properly, requiring force-s...
Status: CONFIRMED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (other bugs)
Version First Reported In: 25.04.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-28 03:47 UTC by Russell Haley
Modified: 2025-12-28 13:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Russell Haley 2025-07-28 03:47:29 UTC
SUMMARY

After some time, or after a wifi disable/re-enable, the sshfs mount gets into a bad state.

Kdeconnectd can see the phone (battery status, etc.), but attempting to browse the contents results in I/O errors, which Dolphin represents as "authorization required", and rsync reports as:

> "cannot stat destination "/run/user/1000/[snip]": Input/output error (5)


STEPS TO REPRODUCE
1. Browse phone in file manager, verifying files are visible. Not just top level /internal and /sd-card directories.
2. Disable wifi on phone, wait 5-10 seconds, and re-enable. 
3. Refresh view in file manager.

OBSERVED RESULT

Cannot access phone filesystem.

EXPECTED RESULT

Can access phone filesystem.

SOFTWARE/OS VERSIONS

Android: 12, Oneplus N200
Android app: 1.33.4
Kdeconnectd (desktop): 25.04.3
sshd (desktop): OpenSSH_9.9p1, OpenSSL 3.2.4 11 Feb 2025

ADDITIONAL INFORMATION

I have found two workarounds:

1. fusermount -u /run/user/$me/$uuid
2. Forcibly restart KDE Connect android app (long press icon -> "app info" -> "Force Stop" -> "Open").

By pulling the sshfs command out of "ps aux", I was able to reproduce the problem interactively.  Sshfs error output looks like:

debug1: Reading configuration data /dev/null
debug1: Connecting to 192.168.94.198 [192.168.94.198] port 1739.
debug1: connect to address 192.168.94.198 port 1739: Connection refused
ssh: connect to host 192.168.94.198 port 1739: Connection refused
read: Connection reset by peer
debug1: Reading configuration data /dev/null
debug1: Connecting to 192.168.94.198 [192.168.94.198] port 1739.
debug1: connect to address 192.168.94.198 port 1739: Connection refused
ssh: connect to host 192.168.94.198 port 1739: Connection refused
read: Connection reset by peer
debug1: Reading configuration data /dev/null
debug1: Connecting to 192.168.94.198 [192.168.94.198] port 1739.
debug1: connect to address 192.168.94.198 port 1739: Connection refused
ssh: connect to host 192.168.94.198 port 1739: Connection refused
read: Connection reset by peer
debug1: Reading configuration data /dev/null
debug1: Connecting to 192.168.94.198 [192.168.94.198] port 1739.
debug1: connect to address 192.168.94.198 port 1739: Connection refused
ssh: connect to host 192.168.94.198 port 1739: Connection refused
read: Connection reset by peer
debug1: Reading configuration data /dev/null
debug1: Connecting to 192.168.94.198 [192.168.94.198] port 1739.
debug1: connect to address 192.168.94.198 port 1739: Connection refused
ssh: connect to host 192.168.94.198 port 1739: Connection refused
read: Connection reset by peer
Comment 1 Russell Haley 2025-07-28 03:49:25 UTC
Oops, supplied version of wrong ssh program... Corrected:

>$ sshfs --version
>SSHFS version 3.7.3
>FUSE library version 3.16.2
>using FUSE kernel interface version 7.38
>fusermount3 version: 3.16.2
Comment 2 Russell Haley 2025-07-28 21:07:18 UTC
Update: Claimed workaround "fusermount -u" fails after a ~long time~ has elapsed. The only thing that reliably allows syncing is to manually pick up my phone and force-restart the app.
Comment 3 goo 2025-12-28 13:50:47 UTC
I have the same issue.
When my android phone reconnects to wifi I can no longer browse the sshfs mount. If I manually unmount the phone the share is visibile again:

$ pgrep -a -f -i /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4
2999573 /usr/bin/sshfs kdeconnect@192.168.9.221:/ /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4 -p 1739 -s -f -F /dev/null -o IdentityFile=/home/goo/.config/kdeconnect/privateKey.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o uid=1000 -o gid=1000 -o reconnect -o ServerAliveInterval=30 -o password_stdin

$ ls /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4/storage/emulated/0
ls: lettura della directory '/run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4/storage/emulated/0': Errore di input/output

$ umount /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4

$ ls /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4/storage/emulated/0
Alarms    AppManager   Backup   ColorOS   Dictionaries   Download        GPX      Librera   Mappe    Music           Notifications              oua_classifier   Podcasts     Ringtones  'Subtitles Generator'   Termux
Android   Audiobooks   Books    DCIM      Documents      full-logs.txt   GSWave   Lyrics    Movies  'My Documents'   open-android-backup-temp   Pictures         Recordings   RustDesk    Tasker
Comment 4 goo 2025-12-28 13:51:39 UTC
I have the same issue.
When my android phone reconnects to wifi I can no longer browse the sshfs mount. If I manually unmount the phone the share is visibile again:

$ pgrep -a -f -i /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4
2999573 /usr/bin/sshfs kdeconnect@192.168.9.221:/ /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4 -p 1739 -s -f -F /dev/null -o IdentityFile=/home/goo/.config/kdeconnect/privateKey.pem -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o uid=1000 -o gid=1000 -o reconnect -o ServerAliveInterval=30 -o password_stdin

$ ls /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4/storage/emulated/0
ls: lettura della directory '/run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4/storage/emulated/0': Errore di input/output

$ umount /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4

$ ls /run/user/1000/95b7057a_b14c_4abe_9499_a1c525a250b4/storage/emulated/0
Alarms    AppManager   Backup   ColorOS   Dictionaries   Download        GPX      Librera   Mappe    Music           Notifications              oua_classifier   Podcasts     Ringtones  'Subtitles Generator'   Termux
Android   Audiobooks   Books    DCIM      Documents      full-logs.txt   GSWave   Lyrics    Movies  'My Documents'   open-android-backup-temp   Pictures         Recordings   RustDesk    Tasker