Bug 380417

Summary: fish doesn't use User from .ssh/config
Product: [Frameworks and Libraries] kio-extras Reporter: Jaakko Luttinen <jaakko.luttinen>
Component: FISHAssignee: Plasma Bugs List <plasma-bugs>
Status: CONFIRMED ---    
Severity: wishlist CC: dennis.lissov, elvis.angelaccio, m.lincetto, meven29, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jaakko Luttinen 2017-06-01 09:27:16 UTC
In $HOME/.ssh/config, I have defined something like:

Host somedomain.com
    User someuser

But when connecting with fish in Dolphin as fish://somedomain.com, the username from the config isn't used, instead my own username is used. Other specs like Port and IdentityFile are used. Why not User?
Comment 1 Massimiliano L 2021-04-16 16:00:17 UTC
I am also experiencing this, behaviour seems to be unchanged as of today.
Comment 2 Méven Car 2021-04-17 08:32:10 UTC
As a workaround, you can pass your username as fish://serverusername@somedomain.com

Currently the code defaults the username when not set in the url to your username.
line 713 of fish.cpp

The fish ioslave is quite old code and hard to maintain. I can't test it.

I could provide a patch but I will need someone to test it.
Do feel you can do it Massimiliano ?
You can follow https://www.youtube.com/watch?v=B4xoc0K5iA4 but just for kio-extras, i.e kdesrc-build kio-extras
Comment 3 Massimiliano L 2021-04-17 08:48:14 UTC
(In reply to Méven Car from comment #2)
> As a workaround, you can pass your username as
> fish://serverusername@somedomain.com
> 
> Currently the code defaults the username when not set in the url to your
> username.
> line 713 of fish.cpp
> 
> The fish ioslave is quite old code and hard to maintain. I can't test it.
> 
> I could provide a patch but I will need someone to test it.
> Do feel you can do it Massimiliano ?
> You can follow https://www.youtube.com/watch?v=B4xoc0K5iA4 but just for
> kio-extras, i.e kdesrc-build kio-extras

Hi Méven. Thanks for the feedback. I am available to test it (I had set up a Neon VM for this kind of stuff), I can also take a look at the source code but I am not sure I am experienced enough to help.
Comment 4 Méven Car 2021-04-17 09:12:49 UTC
You checkout this branch https://invent.kde.org/meven/kio-extras/-/tree/work/fish-bug-380417 and let me know how it goes.

I don't know much about fish protocol in particular, so expect the unexpected.
Comment 5 Massimiliano L 2021-04-24 18:08:28 UTC
(In reply to Méven Car from comment #4)
> You checkout this branch
> https://invent.kde.org/meven/kio-extras/-/tree/work/fish-bug-380417 and let
> me know how it goes.
> 
> I don't know much about fish protocol in particular, so expect the
> unexpected.

Testing this is on my todo, I apologise but I got busy with work and I do not have the test bench ready yet.