Here kdeconnect is again unable to mount remote filesystems for file browsing.
As it has already happened in 2021, it replies Error when accessing filesystem. sshfs finished with exit code 1
Is it only me? Apparently there is a thread about this on arch at [NOT SOLVED[ kdeconnect fails after Plasma 6.1 update / Newbie Corner / Arch Linux Forums but it has to do with plasma 6.1 that has not already landed on Manjaro stable.
1 Like
Trying to debug, I see that kdeconnect calls sshfs with the option HostKeyAlgorithms=+ssh-dss,ssh-rsa
, and possibly fuse does not seem to like it.
Trying the sshfs call manually, I succeed in getting a password prompt if I remove the ssh-dss
part.
Ugly hack to fix the issue:
-
move /usr/bin/sshfs
to /usr/bin/sshfs.real
-
create a /usr/bin/sshfs
file with the following content
#!/usr/bin/env bash
SSHFS_BIN="/usr/bin/sshfs.real"
if [[ "$1" =~ ^kdeconnect ]]; then
new_args=()
for arg in "$@"; do
if [[ "$arg" = "HostKeyAlgorithms=+ssh-dss\,ssh-rsa" ]]; then
arg="HostKeyAlgorithms=ssh-rsa"
fi
new_args+=("$arg")
done
"$SSHFS_BIN" "${new_args[@]}"
else
"$SSHFS_BIN" "$@"
fi
Looks like kdeconnect is using authentication algorithms (ssh-dss) that have been removed from openssh.
Credits to https://www.reddit.com/r/kde/comments/1ck6vp9/bypass_kdeconnect_sshfs_errors/ for the workaround (even if I had to change the scripts found there that were not OK on Manjaro).
1 Like
The non-hackish approach would be to fix plugins/sftp/mounter.cpp
wrt the “HostKeyAlgorithms=+ssh-dss\,ssh-rsa”
Apparently arch already applies an upstream patch for this.
See
upgpkg: 24.05.2-2: Add compatibility with openssh 8.9 (612365f5) · Commits · Arch Linux / Packaging / Packages / kdeconnect · GitLab.
However the patch is broken. You need
diff -Naur kdeconnect-kde-24.05.2/plugins/sftp/mounter.cpp kdeconnect-kde-24.05.2-manj/plugins/sftp/mounter.cpp
--- kdeconnect-kde-24.05.2/plugins/sftp/mounter.cpp 2024-06-28 23:08:24.000000000 +0200
+++ kdeconnect-kde-24.05.2-manj/plugins/sftp/mounter.cpp 2024-07-15 14:04:30.895329597 +0200
@@ -122,9 +122,9 @@
<< QStringLiteral("-o") << QStringLiteral("IdentityFile=") + KdeConnectConfig::instance().privateKeyPath()
<< QStringLiteral("-o") << QStringLiteral("StrictHostKeyChecking=no") // Do not ask for confirmation because it is not a known host
<< QStringLiteral("-o") << QStringLiteral("UserKnownHostsFile=/dev/null") // Prevent storing as a known host
- << QStringLiteral("-o") << QStringLiteral("HostKeyAlgorithms=+ssh-dss\\,ssh-rsa") // https://bugs.kde.org/show_bug.cgi?id=351725
- << QStringLiteral("-o") << QStringLiteral("PubkeyAcceptedKeyTypes=+ssh-rsa") // https://bugs.kde.org/show_bug.cgi?id=443155
- << QStringLiteral("-o") << QStringLiteral("uid=") + QString::number(getuid())
+ << QStringLiteral("-o") << QStringLiteral("HostKeyAlgorithms=ssh-rsa") // https://bugs.kde.org/show_bug.cgi?id=351725
+ << QStringLiteral("-o") << QStringLiteral("PubkeyAcceptedKeyTypes=+ssh-rsa") // https://bugs.kde.org/show_bug.cgi?id=443155
+ << QStringLiteral("-o") << QStringLiteral("uid=") + QString::number(getuid())
<< QStringLiteral("-o") << QStringLiteral("gid=") + QString::number(getgid())
<< QStringLiteral("-o") << QStringLiteral("reconnect")
<< QStringLiteral("-o") << QStringLiteral("ServerAliveInterval=30")
rather than the upstream patch 4f3a8968.patch
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.