How to setup emacs tramp to open remote files while local shell is fish? More precisely is how to ask tramp to use bash shell instead of one named in SHELL environment variable?
The answer referring to
explicit-shell-file-name is incorrect. Tramp invokes the copy command locally (for those tramp methods that use this mechanism) By calling
shell-file-name as the shell.
That variable is initialised from the environment Emacs is started from, so will usually be the user's login shell.
You can customize this variable to "/bin/sh" to get tramp (and no doubt other Emacs packages) to work as expected.