Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable greeting message when ssh in to a server?

Tags:

linux

ssh

ubuntu

Every time - I ssh into my server I keep getting

ssh [email protected]

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 ?

like image 430
code-8 Avatar asked Jul 02 '15 15:07

code-8


People also ask

How do I stop ssh messages?

Use the -q (quiet) option to ssh and scp, to suppress the /etc/motd (and related) messages.


1 Answers

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.

like image 173
tvm Avatar answered Sep 28 '22 07:09

tvm