SSH进入服务器时如何禁用问候消息?

kyo*_*kyo 3 linux ssh ubuntu

每次-我一直ssh进入服务器

ssh根@ 12.34.56.78

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
Run Code Online (Sandbox Code Playgroud)

可以在我第一次登录服务器时显示。但是一直看到此消息-我发现这是不必要的。

有人可以告诉我如何禁用它吗?

tvm*_*tvm 6

如果是您自己的服务器,最明智的解决方案是在SSH守护程序配置中禁用motd in。设置PrintMotd/etc/ssh/sshd_configno并重新启动ssh守护进程。

或者,您可以尝试使用touch ~/.hushlogin,这将在您的主文件夹中创建一个空文件。传统上,允许远程登录的后台驻留程序会检查此文件的存在,如果存在,它们将使您安静地登录。

  • `touch〜/ .hushlogin`可以正常工作。 (4认同)
  • 另外,我刚刚检查过,我的“PrintMotd”已经设置为“no”。现在尝试你的最后一个建议。 (2认同)