Raspberry Pi Login Message

You are here:
< All Topics
Hermes:~ allen$ ssh enyo
Linux Enyo 5.4.83+ #1379 Mon Dec 14 13:06:05 GMT 2020 armv6l
Last login: Wed Jan 26 16:49:53 2022 from 192.168.1.2

   .~~.   .~~.    Thursday, 27 January 2022, 07:44:54 PM
  '. \ ' ' / .'   Linux 5.4.83+ armv6l GNU/Linux
   .~ .~~~..~.    Device.............: Enyo
  : .~.'~'.~. :   Uptime.............: 14 days, 20h27m21s
 ~ (   ) (   ) ~  Memory.............: 97152kB (Free) / 442224kB (Total)
( : '~'.~.'~' : ) Load Averages......: 0.21, 0.14, 0.12 (1, 5, 15 min)
 ~ .~ (   ) ~. ~  Running Processes..: 103
  (  : '~' :  )   IP Addresses.......: 192.168.1.36
   '~ .~~~. ~'    Used Disk Space....: 23%
       '~'        Temp...............: 47'C

add to -> .bash_login
 
let upSeconds="$(/usr/bin/cut -d. -f1 /proc/uptime)"
let secs=$((${upSeconds}%60))
let mins=$((${upSeconds}/60%60))
let hours=$((${upSeconds}/3600%24))
let days=$((${upSeconds}/86400))
UPTIME=`printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs"`
cpu=$(</sys/class/thermal/thermal_zone0/temp)
# get the load averages
read one five fifteen rest < /proc/loadavg
echo "$(tput setaf 2)
   .~~.   .~~.    `date +"%A, %e %B %Y, %r"`
  '. \ ' ' / .'   `uname -srmo`$(tput setaf 1)
   .~ .~~~..~.    Device.............: $(hostname)
  : .~.'~'.~. :   Uptime.............: ${UPTIME}
 ~ (   ) (   ) ~  Memory.............: `cat /proc/meminfo | grep MemFree | awk {'print $2'}`kB (Free) / `cat /proc/meminfo | grep MemTotal | awk {'print $2'}`kB (Total)
( : '~'.~.'~' : ) Load Averages......: ${one}, ${five}, ${fifteen} (1, 5, 15 min)
 ~ .~ (   ) ~. ~  Running Processes..: `ps ax | wc -l | tr -d " "`
  (  : '~' :  )   IP Addresses.......: `ifconfig -a | awk -v iface="wlan0" '{if($1!=iface":"){next};getline;print $2;exit(0)}'`
   '~ .~~~. ~'    Used Disk Space....: `df -Ph | grep -E '^/dev/root' | awk '{ print $5 }' | awk -F '.' '{ print $1 }'`
       '~'        Temp...............: $((cpu/1000))'C
$(tput sgr0)"

Test by reloading – . ~/.bash_login

Remove the “Message of the Day” or “motd” you can find it in /etc/motd

sudo nano /etc/motd

Check contents of /etc/ssh/sshd_config

cat /etc/ssh/sshd_config |grep Print
PrintMotd no
#PrintLastLog yes

Previous NRF24L01
Next RTL2838 device (Realtek RTL2838UHIDIR)
Table of Contents