Bug 3393

Summary: ssh_config: Overriding (local!) user shell
Product: Portable OpenSSH Reporter: Nevo Hed <nhed+openssh-bugzilla22>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: NEW ---    
Severity: enhancement    
Priority: P5    
Version: 8.6p1   
Hardware: Other   
OS: Linux   

Description Nevo Hed 2022-02-18 12:51:00 AEDT
We have a large shared ssh config that is shared between many
company employees.  A few of the entries have items like

    Host bla+*
        ProxyCommand ssh -q bla-jumpbox nc $(sed 's@bla+@@; s@.blahnet@@'<<<%h).blahnet %p


Which usually works perfectly.  Today I learned that some users use
shells where this is not valid syntax (fish).

As a temporary workaround I advised the user to try to alias `ssh`
and `scp` so that they are prefixed with `SHELL=/bin/sh`.

Obviously we would make all of these wrapped with `sh -c "...."`
but that will make the configs less readable and we also would 
probably miss some because the user adding an entry is most likely
the rare `fish` user.

Suggestion: Add an ssh_config keyword such as `LocalShell` to 
override current logic when determining local shell to use
when executing:
    - ProxyCommand,
    - LocalCommand, &
    - Match exec statements

NOTE: this is about the *LOCAL* (client side) shell.
Comment 1 Nevo Hed 2022-02-19 02:17:14 AEDT
Description Correction:

Replace

    ~adding an entry is most likely the rare `fish` user.~

with

    adding an entry is most likely *not* the rare `fish` user.