SSH ProxyJump Error

Here I go again :smiley:

When connecting to a ssh host via ProxyJump the ssh connections throws an error.

λ ssh -J host.A host.B
kex_exchange_identification: banner line contains invalid characters
banner exchange: Connection to UNKNOWN port 65535: invalid format

What is happening?

debug1: kex_exchange_identification: banner line 0: \033[?25l\033[?7l\033[0m\033[34m\033[1m
debug1: kex_exchange_identification: banner line 1:                      .%;888:8898898:
debug1: kex_exchange_identification: banner line 2:                    x;XxXB%89b8:b8%b88:
debug1: kex_exchange_identification: banner line 3:                 .8Xxd                8X:.
debug1: kex_exchange_identification: banner line 4:               .8Xx;                    8x:.
debug1: kex_exchange_identification: banner line 5:             .tt8x          \033[0m\033[34m\033[1m.d\033[0m\033[34m\033[1m            x88;
debug1: kex_exchange_identification: banner line 6:          [email protected];          \033[0m\033[34m\033[1m.db:\033[0m\033[34m\033[1m              [email protected];
debug1: kex_exchange_identification: banner line 7:        \033[0m\033[34m\033[1m,tSXX\302\260          [email protected];
debug1: kex_exchange_identification: banner line 8:      .SXxx            bBBBBBBBBBBBBBBBBBBBbSBX8;
debug1: kex_exchange_identification: banner line 9:    ,888S                                     pd!
debug1: kex_exchange_identification: banner line 10:   8X88/                                       q
debug1: kex_exchange_identification: banner line 11:   GBB.
debug1: kex_exchange_identification: banner line 12:    \033[0m\033[34m\033[1mx%88        [email protected]@[email protected]@[email protected]@[email protected]@[email protected]@X.
debug1: kex_exchange_identification: banner line 13:      dxXd    dB8b8b8B8B08bB88b998888b88x.
debug1: kex_exchange_identification: banner line 14:       dxx8o                      [email protected]@;.
debug1: kex_exchange_identification: banner line 15:         dx88                   [email protected]
debug1: kex_exchange_identification: banner line 16:           d:[email protected]
debug1: kex_exchange_identification: banner line 17:             .d988999889889899dd.\033[0m
debug1: kex_exchange_identification: banner line 18: \033[18A\033[9999999D\033[51C\033[0m\033[1m\033[34m\033[1meha\033[[email protected]\033[34m\033[1meha-notebook\033[0m
debug1: kex_exchange_identification: banner line 19: \033[51C\033[0m----------------\033[0m
debug1: kex_exchange_identification: banner line 20: \033[51C\033[0m\033[34m\033[1mOS\033[0m\033[0m:\033[0m Garuda x86_64\033[0m
debug1: kex_exchange_identification: banner line 21: \033[51C\033[0m\033[34m\033[1mHost\033[0m\033[0m:\033[0m N24_25BU\033[0m
debug1: kex_exchange_identification: banner line 22: \033[51C\033[0m\033[34m\033[1mKernel\033[0m\033[0m:\033[0m 5.9.11-zen2-1-zen\033[0m
debug1: kex_exchange_identification: banner line 23: \033[51C\033[0m\033[34m\033[1mUptime\033[0m\033[0m:\033[0m 3 hours, 56 mins\033[0m
debug1: kex_exchange_identification: banner line 24: \033[51C\033[0m\033[34m\033[1mPackages\033[0m\033[0m:\033[0m 1243 (pacman)\033[0m
debug1: kex_exchange_identification: banner line 25: \033[51C\033[0m\033[34m\033[1mShell\033[0m\033[0m:\033[0m /usr/bin/fish 3.1.2\033[0m
debug1: kex_exchange_identification: banner line 26: \033[51C\033[0m\033[34m\033[1mResolution\033[0m\033[0m:\033[0m 1920x1080, 1920x1080\033[0m
debug1: kex_exchange_identification: banner line 27: \033[51C\033[0m\033[34m\033[1mDE\033[0m\033[0m:\033[0m Plasma 5.20.4\033[0m
debug1: kex_exchange_identification: banner line 28: \033[51C\033[0m\033[34m\033[1mWM\033[0m\033[0m:\033[0m KWin\033[0m
debug1: kex_exchange_identification: banner line 29: \033[51C\033[0m\033[34m\033[1mTerminal\033[0m\033[0m:\033[0m alacritty\033[0m
debug1: kex_exchange_identification: banner line 30: \033[51C\033[0m\033[34m\033[1mTerminal Font\033[0m\033[0m:\033[0m FantasqueSansMono\033[0m
debug1: kex_exchange_identification: banner line 31: \033[51C\033[0m\033[34m\033[1mCPU\033[0m\033[0m:\033[0m Intel i7-7500U (4) @ 3.5GHz\033[0m
debug1: kex_exchange_identification: banner line 32: \033[51C\033[0m\033[34m\033[1mGPU\033[0m\033[0m:\033[0m Intel HD Graphics 620\033[0m
debug1: kex_exchange_identification: banner line 33: \033[51C\033[0m\033[34m\033[1mMemory\033[0m\033[0m:\033[0m 8585MiB / 31907MiB\033[0m
debug1: kex_exchange_identification: banner line 34:
debug1: kex_exchange_identification: banner line 35: \033[51C\033[30m\033[40m   \033[31m\033[41m   \033[32m\033[42m   \033[33m\033[43m   \033[34m\033[44m   \033[35m\033[45m   \033[36m\033[46m   \033[37m\033[47m   \033[m
debug1: kex_exchange_identification: banner line 36: \033[51C\033[38;5;8m\033[48;5;8m   \033[38;5;9m\033[48;5;9m   \033[38;5;10m\033[48;5;10m   \033[38;5;11m\033[48;5;11m   \033[38;5;12m\033[48;5;12m   \033[38;5;13m\033[48;5;13m   \033[38;5;14m\033[48;5;14m   \033[38;5;15m\033[48;5;15m   \033[m
debug1: kex_exchange_identification: banner line 37:

Ohh boy...
This looks like a fish shell issue and I am completely new to fish.
But I am doing some research how to fix this.

Edit:
Found this

Git Quote:

I think I've worked it out now. The problem is that base16 gets executed on every shell invocation with the suggested installation instruction. In bash and zsh, .bashrc/.zshrc only get executed for interactive shells, but config.fish is executed for every shell. base16 works by spewing a bunch of control characters to the terminal, but in this case the terminal is stdin of ssh.

Try this instead in your config.fish:

if status --is-interactive
    sh $HOME/.config/base16-shell/base16-default.dark.sh
end

The reason I couldn't reproduce this is that I don't use fish as my login shell - instead I exec it from the bottom of my .zshrc. (ssh's ProxyCommand assumes that your login shell is sh-compatible, which is probably unwise.)

1 Like

Wait no, this is not fish making this.

I tried to disable the greeter by adding this to the ~/.config/fish/config.fish

function fish_greeting
end

But the stuff still appears, it's neofetch that is doing this.

edit:
Yes indeed, I updated the ~/.config/fish/config.fish

- neofetch
+ # neofetch

And now ssh ProxyJump is working.

But I would like to keep neofetch! :smiley:

My Fix is to edit ~/.config/fish/config.fish

Remove:

neofetch

and add

if status --is-interactive
   neofetch
end

Now it's working as intended.

2 Likes

Neofetch is there but do not start in every new terminal.

2 Likes

Maybe I should add that I use the Garuda KDE Dr460nized.

3 Likes

Its default in fish tho
Maybe its possible to do something like "if session = interactive -> execute neofetch" :thinking:
Edit: nvm, you got it already. Will the config accordingly :smiley:

4 Likes