linux - 当 ssh 连接到服务器时,如何禁用问候消息?

标签 linux ubuntu ssh

<分区>

每次 - 我 ssh进入我的服务器,我不断收到

ssh root@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

我第一次登录服务器时显示是可以的。 但是一直看到这个消息 - 我觉得有点不必要。

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

最佳答案

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

或者,您可以尝试touch ~/.hushlogin,这会在您的主文件夹中创建一个空文件。允许远程登录的守护进程通常会检查此文件是否存在,如果存在,它们会让您安静地登录。

关于linux - 当 ssh 连接到服务器时,如何禁用问候消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31188489/

相关文章:

node.js - 服务器日志显示奇怪的事件(如何复制)

postgresql - 如何在 PostgreSQL 16 中设置 "VARSIZE"和 "SET_VARSIZE"

mercurial - 如何为单个 hg 存储库设置多个 ssh 身份?

encryption - 客户端和服务器之间的 ssh : How does server decrypt the data send by client to it?

eclipse - 如何在eclipse中解决 "ssh error occurred during unpacking on the remote end: unpack-objects abnormal exit"

linux - 如何为我的嵌入式系统构建 rpm 二进制文件?

ssl - 使用 SSL 启动 CouchDB

linux - 为什么这个 bash 脚本获取 http header

linux - 堆使用较少但可用内存较少

Linux - 如何在 X Windows 之外为触摸屏编程