Is it possible to ssh to a machine as a user with no valid shell (say, mail
)? So far I cannot, and using the command below doesn't work:
$ ssh mail@machine.local /bin/bash
It will always say "This account is currently not available.". But if I'm logged-in to the machine and use 'su'
$ su mail -s /bin/bash
I can become user mail
.
Best Answer
The command passed to
ssh
is run by the shell on the server, so if no valid shell is specified then it is not possible to run it.