Note: The Listed platform will permanently shut down December 31, 2026. Your data published on Listed will still be available in your personal Standard Notes account. Learn more

๐Ÿง  HMAS TIP

๐Ÿ–ฅ๏ธ SSH Welcome Message with Hacker Style ๐Ÿ˜Ž

Give your server logins some hacker flair by pulling a dynamic message

from HMAS every time you SSH in. ๐Ÿ’ฌ

No more boring Last login: โ€” now it says something spicy. ๐ŸŒถ๏ธ


๐Ÿš€ What This Script Does

  • Connects to HMAS API on SSH login
  • Calls: api.php?as=admin&apikey=...
  • Prints the message as a login banner (like a stylish MOTD)

๐Ÿ“œ Script: api_login_message.sh

#!/bin/bash

# === BASIC CONFIG ===
API_KEY="your_api_key"
API_URL="https://carlostkd.ch/hmas/api.php"
MSG="admin"

# === FETCH AND DISPLAY MESSAGE ===
RESPONSE=$(curl -s -G "$API_URL" \
    --data-urlencode "as=$MSG" \
    --data-urlencode "apikey=$API_KEY")

if [[ -n "$RESPONSE" ]]; then
    echo -e "\n[1;36m๐Ÿ’ฌ Admin Message:[0m"
    echo -e "$RESPONSE\n"
fi

๐Ÿ› ๏ธ Installation Instructions

๐Ÿง For a Single User:

  1. Save the script to your home directory: bash nano ~/api_login_message.sh
  2. Paste the code above and update your API_KEY and API_URL. Optionaly replace "admin" with anything else
  3. Make it executable: bash chmod +x ~/api_login_message.sh
  4. Add this to the end of ~/.bashrc: bash bash ~/api_login_message.sh

๐ŸŒ For All Users (Global MOTD Style):

  1. Save the script to /etc/profile.d/: bash sudo nano /etc/profile.d/api_login_message.sh
  2. Paste the code and update the credentials.
  3. Make it executable: bash sudo chmod +x /etc/profile.d/api_login_message.sh

๐Ÿง  Pro Tips

  • Works great for red team ops and themed environments ๐Ÿ•ถ๏ธ
  • Use custom messages like as=security or as=alert once youโ€™re ready
  • Combine with /etc/motd for ultimate login experience

๐Ÿ˜‚ Bonus Message

โ€œThey logged into the Matrix and all I got was this lousy shell.โ€

Happy hacking!


You'll only receive email when they publish something new.

More from Carlostkd โœ…
All posts