Traditionally we used rwall command to send a message to every user on a network. Rwall works over insecure network. Instead of that, we can use wall command over ssh as follows, which is more secure and works with almost all UNIX variant.
1) ssh with wall syntax is as follows, after EOF press enter/return key and type message. When the message is complete, type EOF:
$ ssh root@remote-system wall<<EOF
2) To display message “Kernel is upgraded on this server. System is schedule to reboot in 45-minute time. Please logout and save your work” to ever user on remote FreeBSD system pweb.test.com
$ ssh email@example.com wall <<EOF
Kernel is upgraded on this server $(hostname).
System is schedule to reboot in 45-minute time.
Please logout and save your work.
Current local data and time is $(date)
Please note it might prompt for password if ssh-keys not used. Once password supplied it will execute wall command on remote server pweb.test.com. In order to work this remote UNIX/BSD/Linux must have sshd (ssh server) running. Also, notice that we have executed hostname and date command using command substitution feature of shell. This tips also works with Linux and other UNIX like operating system.TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop