Bug 432143 - ssh config file with "includes" not taken into account
Summary: ssh config file with "includes" not taken into account
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-26 09:51 UTC by slartibart70
Modified: 2024-02-11 18:25 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description slartibart70 2021-01-26 09:51:48 UTC
i have several entries in my ~/.ssh/config file and krusader happily picks them up for connections like 'sftp://aliasName/blah'

To get some order into my configs, i distributed the entries into several files and have an 'include' in my ~/.ssh/config like so (must be at the beginning for it to work!):

# includes
Include config_others

Host somehost
     HostName 1.2.3.4
...

In krusader, only the entries of config are available for sftp.
If i want to use 'config_others', i have to explicitly move or symlink this file to ~/.ssh/config for krusader to pick it up.

(or, could this be a bug in the kio framework which krusader is simply using?)
Comment 1 Davide Gianforte 2021-01-27 07:15:55 UTC
Can you try the same on Dolphin? Sftp is handled by kio-extras, it could be a common problem or a wrong implementation in Krusader.

Thank you
Comment 2 slartibart70 2021-02-05 15:18:42 UTC
sorry for the long delay..

Tried with dolphin, the behaviour is exactly the same as in krusader.

So:
having a config file without "include"s, those entries are resolved.
Having a config file which i want to include as 'standalone' config, all is well 
Having a config file with the include statement, then the inlcuded files entries are not resolved

I think this is clearly a problem with kio then
Comment 3 Pedro V 2024-01-24 02:01:35 UTC
Seems to be working with KDE Frameworks 5.110.0 .

It wasn't likely to be a Krusader problem to begin with as that just uses KIO (and extras) where the SFTP slave is a wrapper for libssh.
Figured that this would be yet another libssh problem as its options support is quite spotty, but apparently it supported Include well before the bug report, so theoretically it should have worked already.

Not sure why did the issue happened back then, but I can't reproduce it, so assuming that something was fixed after all.
Comment 4 Bug Janitor Service 2024-02-08 03:45:40 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 slartibart70 2024-02-09 12:18:03 UTC
i tried freshly with Includes and it works as expected.
Closing this ticket now.
Comment 6 slartibart70 2024-02-09 20:54:46 UTC
sorry to reopen: but still not working correctly:

in my config, i had more than one include and now i have according to man,  more than one file defined within a single include.
The problem is, only the first included file gets resolved properly, the rest goes into error with 'host definition not found'

According to the man pages of ssh_config:
Include
               Include the specified configuration file(s).  Multiple pathnames may be specified and each pathname may contain  glob(7)  wildcards
               and, for user configurations, shell-like ‘~’ references to user home directories.  Wildcards will be expanded and processed in lex‐
               ical  order.   Files without absolute paths are assumed to be in ~/.ssh if included in a user configuration file or /etc/ssh if in‐
               cluded from the system configuration file.  Include directive may appear inside a Match or Host block to perform conditional inclu‐
               sion.

My config is spread over several files.
If i include them with wildcards, then all of them work.
But not if they are specified in a list...
Comment 7 Pedro V 2024-02-11 16:10:48 UTC
While the recently described issue can be considered a subset of the original problem, it's already being tracked by Bug 475638 .

The other bug report is specifically about the problem that still exists which helps with keeping noise down, therefore I recommend tracking that, and I believe this report should be closed instead of being turned into a duplicate report.
Comment 8 slartibart70 2024-02-11 18:25:36 UTC
i'm fine with this solution!