Problem:
I’ve got a script that generates an ssh command string to generate an ssh session to a remote shell. I want to run this like the following:
function_name args | bash
However it executes the ssh command in a subshell (apologies if that’s the wrong terminology) and I can’t then use it.
What’s the correct way to run this so it executes in the same shell, and I can then write into that shell?