Bug 480547 - Cannot connect to remote servers from .ssh/config/ that don't use a resolvable hostname as an identifier
Summary: Cannot connect to remote servers from .ssh/config/ that don't use a resolvabl...
Status: CONFIRMED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: SFTP (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-30 16:27 UTC by jan
Modified: 2024-02-23 11:28 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jan 2024-01-30 16:27:47 UTC
STEPS TO REPRODUCE
1. have an external host defined in .ssh/config/
2. use sftp://the_hostname/some/path/

OBSERVED RESULT
Error: Internal Error
Please send a full bug report at https://kde.bugs.org
Could not set host

EXPECTED RESULT
SFTP connection is established.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
It definitely worked before upgrading to 22.04.
The definition in .ssh/config is like
Host the_hostname
    User someuser
    HostName 123.456.654.321
    Port 22

It works on local servers but fails on external ones. `ssh the_hostname` works just fine.
Affected are hosts with underscores and those without.
It works if I set the entry name to something DNS-resolvable.
Comment 1 Pedro V 2024-02-08 14:38:24 UTC
Initially I wanted to just conclude that it's a works for me kind of matter, but although the IP address you provided is not valid, I figured the friendly hostname pattern was deliberate, so I gave that a try.

It turns out that the problem is with the underscore, can reproduce seeing the 3 line error message that way.
The issue doesn't appear without special characters or for example dash being used as a separator.

Can also reproduce the issue with Dolphin, so not likely to be specific to Krusader, it's more likely to be a KIO (slave) problem.

KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.110.0
Comment 2 Vincent Wilms 2024-02-23 11:28:00 UTC
For me it does not work even without any underscores in the `Host` field:

```
Host contabo
    HostName <my DNS name>
    User root
    IdentityFile ~/.ssh/id_rsa
    RequestTTY yes
    RemoteCommand fish
```

Kubuntu 23.10
KDE-Plasma-Version: 5.27.8
KDE-Frameworks-Version: 5.110.0



When I then use `sftp://contabo` in Krusader it gives me `Failed to resolve hostname contabo`