FreeBSD >Sending a Message to All Users on a Remote UNIX/Linux/FreeBSD System
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
message1
message2
…
…
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 root@pweb.test.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)
EOF
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.
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- FreeBSD > Sending a Message to an Individual User
- FreeBSD > Sending a Message by E-Mail
- FreeBSD >Sending a Message to All Users on a System
- FreeBSD / Linux: Sending a Message to Windows Workstation with smbclient command
- Poll: How do you keep remote users out in emergency?
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!


Recent Comments
Today ~ 13 Comments
Today ~ 9 Comments
Yesterday ~ 3 Comments
Yesterday ~ 1 Comment
Yesterday ~ 2 Comments