Avatar
Part time CTF Player learn every day!!
🌠 I Love Hoshimachi Suisei!! 🌠
🌠 I Love Hoshimachi Suisei!! 🌠

OverTheWire Bandit Level 13 → 14 tutorial!!

Login

Log in as bandit13 using the password you just obtained from Level 12 → 13.

ssh bandit13@bandit.labs.overthewire.org -p 2220
# password: FO5dwFsc0cbaIiH0h8J2eUks2vdTDwAn

Why? Each Bandit level is a different UNIX user. To solve 13 → 14 you must be logged in as bandit13.

Task

Task

The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14. You’re given a private SSH key in your home directory to log into bandit14@localhost.

A little bit of Theory

  • SSH key login (-i)ssh -i <private_key> user@host tells SSH to use that private key to authenticate.
  • localhost – hostname that always points to the machine you’re already on (the Bandit box). You’re SSH-ing from bandit13 into bandit14 on the same host.
  • First-time connect prompt – SSH will ask to trust the server fingerprint; answering yes stores it in ~/.ssh/known_hosts.
  • Permissions – private keys are usually restricted (e.g., chmod 600 key). If SSH complains about “unprotected private key file”, tighten the permissions.

Further reading:

Solution

  1. Verify the private key is present

    ls -l ~
    

    Why? Confirms the provided key (usually sshkey.private) exists and is readable.

key file

  1. (If needed) Restrict the key’s permissions

    chmod 600 sshkey.private
    

    Why? Some SSH versions refuse to use keys that are group/world-readable.

  2. SSH into bandit14 on the same host using the key

    ssh -i ./sshkey.private bandit14@localhost -p 2220
    

    When asked about authenticity/fingerprint, type yes.

    Why? You must become bandit14 to read the protected password file.

ssh connection

  1. Read the password file as bandit14

    cat /etc/bandit_pass/bandit14
    

    Why? Only bandit14 has permission to read it.

cat password

  1. Copy the password (no trailing spaces/newlines).

  2. Log into the next level (bandit14)

    exit
    ssh bandit14@bandit.labs.overthewire.org -p 2220
    # paste the password you just found when prompted
    

Password

This is the password I got in my run; if yours is different, copy the one shown in your terminal.

MU4VWeTyJk8ROof1qqmcBPaLh7lDCPvS

Troubleshooting

  • Permission denied (publickey) → Make sure you used -i ./sshkey.private, the path is correct, and the key has strict perms (chmod 600 sshkey.private). Also keep -p 2220.
  • Host key prompt appears every time → That’s fine in Bandit’s ephemeral environment; just answer yes.
  • cat: /etc/bandit_pass/bandit14: Permission denied → You’re not bandit14. Re-run the SSH command to switch users first.
  • ssh: connect to host localhost port 2220: Connection refused → Double-check the port (must be 2220) and that you’re on the Bandit host already.

Congrats 🎉 You used a private key to hop to the next user and grabbed the Level 14 password. See you in Level 14 → 15!


Thanks for reading!

Until next time — Otsumachi!! 💖☄️✨

Cinema

all tags

GOT-overwrite aboutme aead ai alphanumeric-shellcode apt argc0 argon2 aslr assembly asymmetric atoi automation backbox bandit base64 bash beginner behemoth binary binary-exploitation binary-to-ascii blackarch blind blind-sqli blogging blue-team bruteforce buffer-overflow buffer-overwrite c caesar canary capabilities checksec command-injection commonmark cookie cron crypto cryptography ctf cutter cyberchef cybersecurity defenders detection dev directory-traversal dnf docs drifter ecc education elf env envp exploitation finale forensics format-string formulaone frequency frequency-analysis gcc gdb getchar gfm ghidra github-pages governance gpg guide hashing hkdf http jekyll jmpbuf kali kasiski kdf kernel keylength kramdown krypton lab ld_preload leviathan lfi lfsr linux linux-syscall llmops log-poisoning ltrace manpage markdown maze memcpy mitigations mitmproxy mlops narnia natas networking newline-injection nonce nop-sled nx object-injection obsidian openssl osint overflow overthewire package-manager pacman parrot path path-hijacking pathname php pie pkc pki pointer-trick pqc priv-esc privilege-escalation provable-security pwn pwntools pyshark python race-condition radare2 rag randomness recon red-team redirect relro requests ret2env ret2libc reverse-engineering reversing ricing roadmap rop rot13 rsa scapy security seed seo serialization session setjmp-longjmp setuid shell shellcode smoke soc sockets sprintf sql-injection srop stack-canary stack-overflow strace strcmp strcpy streamcipher strings strncpy strtoul substitution suid suisei symlink symmetric terminal test threat-intel time-based tls troubleshooting tshark type-juggling ubuntu udp utumno vigenere virtualbox virtualization vmware vortex walkthrough web windows wireshark writing wsl x86
dash theme for Jekyll by bitbrain made with