Ich wollte mal meinen Login aufpimpen und habe dabei Archey, eine ziemlich coole Methode, gefunden um nach dem Anmelden via SSH nützliche Informationen angezeigt zu bekommen.
Die Installation und Konfiguration geht wie folgt (als root):
apt-get install lsb-release scrot cd /tmp wget http://github.com/downloads/djmelik/archey/archey-0.2.8.deb dpkg -i archey-0.2.8.deb nano ~/.bashrc # output only in interactive mode if [[ $- == *i* ]] then archey echo -e '\e[1;31m'; echo " ______ _____ _____ _______"; echo " |_____/ | | | | |"; echo " | \_ |_____| |_____| |"; echo -e '\e[m'; echo "With great power comes great responsibility" fi
Achtung Pitfall!
Warum habe ich die Ausgabe an eine Bedingung (if then Zeile 8) gebunden?
Ganz einfach es gibt sonst z.B. Probleme beim Verbinden mit WinSCP.
--------------------------- Error --------------------------- Received too large (458961211 B) SFTP packet. Max supported packet size is 1024000 B. The error is typically caused by message printed from startup script (like .profile). The message may start with ""[1;"". --------------------------- Cannot initialize SFTP protocol. Is the host running a SFTP server? --------------------------- OK Reconnect (1 s) Help ---------------------------
Quelle:
Archey Debian Installation
Anpassen der Bash-Prompt in Debian
SSH Frequently Asked Questions
How can I check in bash if a shell is running in interactive mode?