Created
June 1, 2025 13:25
-
-
Save ljamel/c3845c21ec1747bec9b1383dc97dd9ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d -v /:/host/ -p 2225:22 dockette/ssh bash -c "\ | |
adduser -D -s /bin/bash cours && \ | |
echo 'cours:abc' | chpasswd && \ | |
adduser -D -s /bin/bash stagiaire && \ | |
echo 'stagiaire:azerty' | chpasswd && \ | |
echo 'FLAG h0tel_du_t3mp' > /home/stagiaire/flag.txt && \ | |
chmod 600 /home/stagiaire/flag.txt && \ | |
chown stagiaire:stagiaire /home/stagiaire/flag.txt && \ | |
echo 'stagiaire:azer' > /home/cours/note.txt && \ | |
chmod 600 /tmp/note.txt && \ | |
chown cours:cours /home/cours/note.txt && \ | |
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/' /etc/ssh/sshd_config && \ | |
ssh-keygen -A && \ | |
/usr/sbin/sshd -D" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment