I am trying to connect to a server via ssh and then execute a command. So far so simple.
The twist is that on that server, I start zsh from my bash. So in my .bashrc I have the command:
exec /bin/zsh -l
So that when I login, it automatically starts my z-shell. And I want to keep it like that.
Unfortunately, when I run my bash script to connect to the server and run a command, it does not work. No error message, the command just runs endlessly.
Is there a way to do this in in spite of the shell change?