Skip to main content

Ubuntu server customization

Disable ssh login spam

Rename unnesessary files with @ at filename start at /etc/update-motd.d

cd /etc/update-motd.d && for file in *; do mv "$file" "@$file"; done # Rename all files
mv @00-header 00-header

also add neofetch as start message if you want to do next step.

cd /etc/update-motd.d && echo "neofetch" >> 00-header

Customize ssh login text

Message by SSH /etc/update-motd.d: use neofetch:

apt install neofetch -y

Add this line to /etc/update-motd.d/00-header

neofetch --config /etc/update-motd.d/config.conf --source /etc/update-motd.d/ascii_art.txt

Config example:

# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
    info title
    info "OS" distro

    info "Kernel" kernel

    info "Packages" packages
    info "Shell" shell
    #info "Resolution" resolution
    info "DE" de
    info "WM" wm
    info "WM Theme" wm_theme
    info "Theme" theme
    info "Icons" icons
    info "Terminal" term
    info "Terminal Font" term_font
    info underline
    info "Host" model
    info "CPU" cpu
    info "GPU" gpu

    info underline
    info "Uptime" uptime
    info "Local IP" local_ip
    info "Public IP" public_ip
    info "Users" users

    info underline
    info "Memory" memory
    #info "GPU Driver" gpu_driver  # Linux/macOS only

    info "CPU Usage" cpu_usage
    info "Disk" disk
    info "Battery" battery
    #info "Font" font
    #info "Song" song
    # [[ "$player" ]] && prin "Music Player" "$player"
    #info "Locale" locale  # This only works on glibc systems.

    #info cols
}

Colored root bash

Edit /root/.bashrc and replace similar liens to this (append -256 color)

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

Beautiful screensaver

Screensaver for you server monitor

apt install cmatrix
cmatrix -s -b