How do I set the shell that is used when a user SSHs to a server. For example I can't stand BASH and need to use ZSH, how do I make it so ZSH is loaded along with my profile (.zsh_profile
) when I ssh to the machine.
I dont want to have to pass a bunch of parameters with ssh either, can't I set the default shell?
Best Answer
If you can't change your default shell,
ssh -t user@host 'zsh -l'
works.The
-t
flag forces a pseudo-tty allocation, and the-l
flag spawns a login shell.