Bandit 18 → 19
Goal: read the readme even though .bashrc closes any interactive login immediately.
Approach
Section titled “Approach”Pass the command as the final argument to ssh, so it runs without ever opening an interactive shell.
$ ssh bandit18@bandit.labs.overthewire.org -p 2220 cat readmeThe password you are looking for is: <password>Password
cGWpMaKXVwDUNgPAVJbWYuGHVn9zl3j8Why it works
Section titled “Why it works”An interactive login sources .bashrc or .profile upon connecting. This one contains immediate exit directive, so a normal session dies before you can type. Supplying a command as the last ssh argument runs it through a non-interactive shell that skips the interactive startup scripts and returns the output directly.