SSH进入服务器时如何禁用问候消息? [英] How can I disable greeting message when ssh in to a server?

查看:27
本文介绍了SSH进入服务器时如何禁用问候消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次-我 ssh 进入我的服务器时,我都会不断

Every time - I ssh into my server I keep getting

ssh root@12.34.56.78

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

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

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 ?

推荐答案

如果大多数合理的解决方案是您自己的服务器,则将在SSH守护程序配置中禁用motd.将/etc/ssh/sshd_config 中的 PrintMotd 设置为 no ,然后重新启动ssh守护程序.

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.

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

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.

这篇关于SSH进入服务器时如何禁用问候消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆