pwncollege / dojo

Infrastructure powering the pwn.college dojo
https://pwn.college
BSD 2-Clause "Simplified" License
285 stars 89 forks source link

Executing a command via `ssh` in a challenge doesn't return the correct exit code #537

Open fpotier opened 1 month ago

fpotier commented 1 month ago

If you ssh into the challenge box and execute a command, the exit status is always 0.

Example:

$ ssh hacker@pwn.college 'exit 1'
$ echo $?
0

Meanwhile:

$ ssh localhost 'exit 1'
$ echo $?
1