Skip to content

Instantly share code, notes, and snippets.

@fralau
Last active November 21, 2020 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fralau/19eca548350199853679833d01148b1d to your computer and use it in GitHub Desktop.
Save fralau/19eca548350199853679833d01148b1d to your computer and use it in GitHub Desktop.
Login banner on restricted host (e.g. on Infomaniak web hosting)

Login banner + system info on restricted host

This will typically work on Infomaniak's standard webhosting.

It is useful to get a host banner and system information when logging in, even on a barebone remote host (few install options are available, no package manager, etc.).

  1. In the home directory, copy the attached .bash_profile (or update if already exists).
  2. Using figlet (on your local machine), create a banner with the nickname you want to give to the host, e.g. figlet MyHost, and copy the string into a banner.txt file in the home directory of the remote host.
  3. mkdir bin
  4. Download screenfetch (for displaying system characteristics): curl https://raw.githubusercontent.com/KittyKatt/screenFetch/master/screenfetch-dev > bin/screenfetch
  5. Try source .bash_profile to check that it's fine.
  6. Logout
  7. Login
# Initialization script
# colors
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS'
clear
echo Last login: not available
# for banner: http://patorjk.com/software/taag
tput setaf 2
tput bold
cat banner.txt
tput sgr0
echo
# System info: https://github.com/KittyKatt/screenFetch
# -E suppresses error
# using the bash command is essential otherwise it exits the session!
bash bin/screenfetch -E
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment