default shell for remote commands through ssh
What you are seeing there is the local login shell.
ssh user@host "echo $SHELL"
With the above, $SHELL
is expanded before ssh is run because it's enclosed in double quotes. So on the remote end you're running echo /bin/zsh
instead of echo $SHELL
.
Use single quotes to avoid $SHELL
being expanded locally.
ssh user@host 'echo "$SHELL"'
See BashFAQ 96 for more on this.
You or someone else must have configured your remote host with zsh
.
To switch back to bash use:
chsh -s /bin/bash
on your remote host.
Though as an aside I would recommend zsh
it's an awesome shell with lots of very useful features, and having it enabled doesn't stop you from being able to use bash
#!/bin/sh
will still run your scripts under bash.