'How can I disable greeting message when ssh in to a server? [closed]
Every time - I ssh into my server I keep getting
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-52-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Thu Jul 2 10:58:35 EDT 2015
System load: 0.16 Processes: 90
Usage of /: 13.5% of 19.56GB Users logged in: 0
Memory usage: 25% IP address for eth0: 12.34.56.78
Swap usage: 0% IP address for eth1: 10.10.10.10
Graph this data and manage this system at:
https://landscape.canonical.com/
Last login: Thu Jul 2 10:58:35 2015 from 50-198-81-174-static.hfc.comcastbusiness.net
It's okay to showing at my first time logging into the server. But seeing this message all the time - I find that a little unnecessary.
Can someone please show me how to disable it ?
Solution 1:[1]
Most sane solution, if it's your own server, would be to disable the motd in in the SSH daemon config. Set PrintMotd in /etc/ssh/sshd_config to no and restart the ssh daemon.
Alternatively, you can try to touch ~/.hushlogin, which creates an empty file in your home folder. Daemons that allow remote logins traditionally check for presence of this file and if it is present, they will let you log in quietly.
Solution 2:[2]
Or, if the motd is set to no, and you don't want to use .hushlogin, you can edit /etc/motd or /etc/update-motd.d/* and just wipe it's contents, so you will still be notified by the "last login" message.
Solution 3:[3]
Inside the file /etc/pam.d/sshd - comment those 2 lines:
Before:
session optional pam_motd.so motd=/run/motd.dynamic
session optional pam_motd.so noupdate
After:
#session optional pam_motd.so motd=/run/motd.dynamic
#session optional pam_motd.so noupdate
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | tvm |
| Solution 2 | |
| Solution 3 | Yakir GIladi Edry |
