Page MenuHomePhabricator

BUG Dolphin SFTP does not work if ssh hosts config uses wildcards, CLI works fine.
Open, Needs TriagePublic

Description

Dolphin SFTP does not work if ssh hosts config uses wildcards, CLI works fine.

I am to the point that my ssh config has a LOT of hosts, so in an effort to make it more readable I went searching if there is a way to turn each host into a 1 liner, unfortunately there is no supported syntax for that, but I did find wildcards. For example you work for a company called Total Trance and have this config (notice how all the hosts in between the jump server and the wildcard definition do not have to list identity file, user, or proxyjump, this config works perfectly fine from the command line):

host jumptt
 hostname 111.222.333.444
 identityfile ~/.ssh/tt-home
 user citlalmino
 port 50123

host ttweb
 hostname 192.168.1.10

host ttemail
 hostname 192.168.1.11

host ttcloud
 hostname 192.168.1.12

host ttbackup
 hostname 192.168.1.13

host ttcalendar
 hostname 192.168.1.14

host ttdns
 hostname 192.168.1.15

host ttmysql
 hostname 192.168.1.16

host tt*
 identityfile ~/.ssh/tt-home
 user citlalmino
 proxyjump jumptt

I first posted this here: https://www.reddit.com/r/kde/comments/jy7ms3/dolphin_sftp_does_not_work_if_ssh_hosts_config/
and then here: https://bugs.kde.org/show_bug.cgi?id=429708

on the kde bug report Herald Sitter said: "Config parsing happens inside the underlying libssh you'll want to file a bug there https://www.libssh.org/"

Event Timeline

xekon added a project: Restricted Project.Dec 1 2020, 4:06 PM

What version of libssh are you using? Saying "does not work" is too broad. What you expect? What happens? Do you have some errors? Debug log would be also useful.

I was not even aware that the problem was libss until the fellow at KDE bug report place let me know. I am using Kubuntu 20.04 and I am running Dolphin which is a file browser tool.

in Dolphin I type into the address bar "sftp://ttcloud" and it does not connect, BUT! if I open yakuake or konsole and just type "ssh ttcloud" then it connect perfectly fine.

I first reported this behaviour on reddit, they told me to go report it with the kde fellows, then the kde fellows told me to come report it here.

it actually does try but says "Timeout connecting to 192.168.1.12"

the reason for this is that it only sees the hostname, it is not taking into account the wildcard below where I instruct it to use proxyjump.

"192.168.1.12" does not even exist on my local network, only the remote network.

I can provide logs if I can get instruction how how to get them, I checked /var/log/syslog with tail while trying sftp in dolphin, but no new lines occur there. I am not really even sure what logs your after, but I am happy to help however I can.

sudo apt install libssh-4
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libssh-4 is already the newest version (0.9.3-2ubuntu2.1).

Here are some deibugging tips for dolphin and libssh:

https://community.kde.org/Guidelines_and_HOWTOs/Debugging/Debugging_IOSlaves/Debugging_kio_sftp

It should provide enough debugging information. You can also try a newer version of libssh as 0.9.3 is a bit older and we have latest 0.9.5 now (that is probably a question for ubuntu maintainers).