Bug 459705 - Connecting to a remote host via a SSH jump host changes custom profile back to the Konsole default profile
Summary: Connecting to a remote host via a SSH jump host changes custom profile back t...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.04.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-26 17:03 UTC by Einar Aleksejev
Modified: 2022-10-29 13:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 22.12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Einar Aleksejev 2022-09-26 17:03:52 UTC
SUMMARY

If you add new profile to Konsole and set it as default, every time you connect to the remote host using SSH jumphost profile will change back to the Konsole default profile Default.

STEPS TO REPRODUCE
1. Create custom profile
2. Set new profile as default
3. Connect to "ssh -J jumphost host" or "ssh host" (ProxyJump jumphost is declared in the ~/.ssh/config)

OBSERVED RESULT
Profile changes from custom to Default.

EXPECTED RESULT
Do not change profile from new custom one.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 22.04 with KDE backports PPA
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3
Graphics Platform: X11
Comment 1 Einar Aleksejev 2022-09-30 05:04:33 UTC
(In reply to Einar Aleksejev from comment #0)
> SUMMARY
> 
> If you add new profile to Konsole and set it as default, every time you
> connect to the remote host using SSH jumphost profile will change back to
> the Konsole default profile Default.
> 
> STEPS TO REPRODUCE
> 1. Create custom profile
> 2. Set new profile as default
> 3. Connect to "ssh -J jumphost host" or "ssh host" (ProxyJump jumphost is
> declared in the ~/.ssh/config)
> 
> OBSERVED RESULT
> Profile changes from custom to Default.
> 
> EXPECTED RESULT
> Do not change profile from new custom one.
> 
> SOFTWARE/OS VERSIONS
> Operating System: Kubuntu 22.04 with KDE backports PPA
> KDE Plasma Version: 5.25.5
> KDE Frameworks Version: 5.98.0
> Qt Version: 5.15.3
> Graphics Platform: X11

One workaround is https://bugs.kde.org/show_bug.cgi?id=453545#c9
Comment 2 Markus Wernig 2022-10-24 19:58:43 UTC
This is an extremely annoying bug that breaks users' working setups.

Please fix it soon or add a possibility to disable the SSH Manager plugin.

Thanks in advance
Comment 3 Markus Wernig 2022-10-24 20:11:44 UTC
Just found another "solution".

Edit ~/.config/konsolesshconfig. 
Somehow all entries from .ssh/config are mirrored there. And each entry has a profileName attribute that points to the name of the default konsole profile.
Manually replacing them with the correct profile name "fixed" the issue for me.
Unfortunately, the "solution" is incomplete, as each new alias in .ssh/config will show up there again with the default profile.
Comment 4 Bug Janitor Service 2022-10-27 19:30:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/759
Comment 5 Kurt Hindenburg 2022-10-29 13:57:46 UTC
Git commit e295f48eb937d17050446872cc1daef06a4b0d61 by Kurt Hindenburg, on behalf of Matan Ziv-Av.
Committed on 29/10/2022 at 13:57.
Pushed by hindenburg into branch 'master'.

Add an option to ssh plugin to avoid changing profile

The default is not to change profiles on ssh connect/disconnect.
The current state is saved in the ssh plugin config file, and can be modified in the ssh plugin widget.
Related: bug 453545
FIXED-IN: 22.12

M  +21   -0    src/plugins/SSHManager/sshmanagermodel.cpp
M  +4    -0    src/plugins/SSHManager/sshmanagermodel.h
M  +2    -0    src/plugins/SSHManager/sshmanagerpluginwidget.cpp
M  +14   -0    src/plugins/SSHManager/sshwidget.ui

https://invent.kde.org/utilities/konsole/commit/e295f48eb937d17050446872cc1daef06a4b0d61