3 ms·
`ssh $host /bin/sh` (or another shell) should work?
by jhugo 5y ago
`ssh $host /bin/sh` (or another shell) should work?
- bch 5y agoOn a Linux box isn’t that just a link to bash?
- yjftsjthsd-h 5y agoIt depends on the distro; on RHEL yes it is BASH, but Debian uses dash, and Alpine uses busybox sh.
- dotancohen 5y agoLogging into another shell would be attempted only if someone knew at the time why the logins were failing. But thanks, I've just added another technique to my toolbox.
- thayne 5y agoDepending on the distribution, /bin/sh might be a symlink to bash
- hddqsb 5y agoThat won't work because sshd runs the command using the user's login shell. From https://man.openbsd.org/sshd#LOGIN_PROCESS https://man.openbsd.org/sshd#LOGIN_PROCESS: > When a user successfully logs in, sshd does the following: > ... > 9. Runs user's shell or command. All commands are run under the user's login shell as specified in the system password database.