Bug 504148 - Can't establish an SFTP connection over KIO
Summary: Can't establish an SFTP connection over KIO
Status: REPORTED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: SFTP (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-13 13:03 UTC by postix
Modified: 2025-11-14 15:53 UTC (History)
1 user (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 postix 2025-05-13 13:03:28 UTC
STEPS TO REPRODUCE
1. Open Dolphin 25.04.1
2. Enter a valid sftp address such as sftp://postix@host _or_ fish://postix@host in the address bar
3. Hit enter

OBSERVED RESULT
Dolphin keeps saying "Loading ..." and "Connecting ..." forever. 
Journalctl logs `kf.kio.core: Invalid URL: QUrl("")`


EXPECTED RESULT
Dolphin connects successfully or at least aborts and shows a useful error.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250509
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.5-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 postix 2025-05-13 13:10:26 UTC
`sftp -i ~/.ssh/id_rsa postix@host` works fine
Comment 2 postix 2025-05-13 13:11:23 UTC
If I try to add a new network folder in the remote section of Dolphin, it keeps saying "Examining" forever and nothing useful is logged.
Comment 3 postix 2025-05-13 13:22:37 UTC
```
> KIO_SFTP_LOG_VERBOSITY=10 KDE_FORK_SLAVES=1 QT_LOGGING_RULES="log_kio_sftp=true;kf.kio.workers.sftp=true;" dolphin --new-window sftp://postix@host
kf.kio.workers.sftp: *** Starting kio_sftp 
kf.kio.workers.sftp: pid =  32483
kf.kio.workers.sftp: debug =  10
kf.kio.workers.sftp: "postix" @ "host" : 0
kf.kio.workers.sftp: 
kf.kio.workers.sftp: list directory:  QUrl("sftp://postix@host")
kf.kio.workers.sftp: checking cache: info.username = "postix" , info.url = "sftp://postix@host"
kf.kio.workers.sftp: *** Starting kio_sftp 
kf.kio.workers.sftp: pid =  32490
kf.kio.workers.sftp: debug =  10
kf.kio.workers.sftp: "postix" @ "host" : 0
kf.kio.workers.sftp: 
kf.kio.workers.sftp: file system free space of QUrl("sftp://postix@host")
kf.kio.workers.sftp: checking cache: info.username = "postix" , info.url = "sftp://postix@host"
```

The following keeps being repeatedly logged once per minute or so:

```
kf.kio.workers.sftp: *** Starting kio_sftp 
kf.kio.workers.sftp: pid =  32607
kf.kio.workers.sftp: debug =  10
kf.kio.workers.sftp: "postix" @ "host" : 0
kf.kio.workers.sftp: 
kf.kio.workers.sftp: file system free space of QUrl("sftp://postix@host")
kf.kio.workers.sftp: checking cache: info.username = "postix" , info.url = "sftp://postix@host"
```
Comment 4 postix 2025-05-13 13:24:54 UTC
Follow up from the post above:

When I click now with the cursor into the address bar in Dolphin and hit "enter" to (again try to) open the remote directory, kio logs `kf.kio.core: Invalid URL: QUrl("")` as once stated above.
Comment 5 postix 2025-05-13 13:38:12 UTC
For the time being I've worked around it by

`sshfs -o IdentityFile=~/.ssh/id_rsa,default_permissions postix@host:/ /mnt/foo`
Comment 6 Alex Hermann 2025-11-14 15:53:21 UTC
kio_sftp uses libssh, not openssh, and might not be compatible with all your ssh config setting. You might want to try another libssh sftp client like "yafc" to connect to the remote to determine if it is a libssh limitation or indeed a possible bug in kio_sftp.