Skip to content

Instantly share code, notes, and snippets.

@tonejito
Created March 2, 2018 23:10
Show Gist options
  • Save tonejito/ab81faabf841fbd18cd24df59b79a251 to your computer and use it in GitHub Desktop.
Save tonejito/ab81faabf841fbd18cd24df59b79a251 to your computer and use it in GitHub Desktop.
Set SSH banner with "Insert coin" message. Like the arcade machines do!
#!/bin/bash
# = ^ . ^ =
printf '\t%s\n' "Insert coin" > /etc/issue.net && \
sed -i 's/^#\(Banner\)/\1/g' /etc/ssh/sshd_config && \
service ssh reload && \
systemctl --full status ssh
cat << EOF
Now connect to localhost via ssh(1) to check if this worked!
--
= ^ . ^ =
EOF
@tonejito
Copy link
Author

tonejito commented Mar 2, 2018

$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
ECDSA key fingerprint is 01:23:45:67:89:ab:cd:ef:01:02:03:04:05:06:07:08.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
	Insert coin
root@localhost's password: 
Linux VF-117D Uptime 00 days 00 hours 01 minutes Load Average 0.01, 0.01, 0.01	= ^ . ^ =

Last login: Fri Mar  2 16:17:18 2018 from localhost

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment