On this level, we’re told that the password is in the readme file of our home directory. Sounds simple enough. However, there’s a command in the bashrc file that logs us out immediately after we’re authenticated. We can get around that by piping commands to ssh. I believe that this works because the shell that gets spawned on the server is not in interactive mode when we pipe input to ssh.

$ echo "cat ./readme" | ssh -p 2220 [email protected]
Pseudo-terminal will not be allocated because stdin is not a terminal.
 _                     _ _ _
| |__   __ _ _ __   __| (_) |_
| '_ \ / _` | '_ \ / _` | | __|
| |_) | (_| | | | | (_| | | |_
|_.__/ \__,_|_| |_|\__,_|_|\__|

a http://www.overthewire.org wargame.

[email protected]'s password:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 4.4.0-71-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX