Introduction

Usually when you logged in you linux based PC remotely via SSH, a long banner will be displayed, including the os and kernel version of the PC, if new release is available, last login time, bashrc error and more. This helps when you are admin, but really annoying for normal users, and even sometimes admin himself.

➜  ~ ssh Xxxxx@xx.xxx.xxx.xx
Xxxxx@xx.xxx.xxx.xx's password:
Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-96-generic x86_64) * Documentation: https://help.ubuntu.com/ New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it. Last login: Wed Sep 14 20:58:27 2016 from 10.222.129.26
-bash: ./usr/local/software/ccp4/ccp4-6.5/bin/coot: No such file or directory

The banner is generated by scripts under /etc/update-motd.d/. All are SHELL scripts.

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-96-generic x86_64)
# the line above is generated by /etc/update-motd.d/00-header * Documentation: https://help.ubuntu.com/ # these lines are generated by /etc/update-motd.d/10-help-text
New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
# those lines are generated by /etc/update-motd.d/91-release-upgrade,
# which executes /usr/lib/ubuntu-release-upgrader/release-upgrade-motd,
# which prints /var/lib/ubuntu-release-upgrader/release-upgrade-available [containing the release msg]
Last login: Wed Sep 14 20:58:27 2016 from 10.222.129.26
# the line is controlled by option `PrintLastLog` in `/etc/ssh/sshd_config`
# if `no' is given, the line will not be printed
# non-last lines are controlled by option `PrintMotd` in `/etc/ssh/sshd_config`
# if `no' is given, all the content in /var/run/motd.dynamic will not be printed

The /var/run/motd.dynamic file contains

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-96-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

New release '16.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

customizing the banner

There is a option in /etc/ssh/sshd_config named Banner, which allows you to specify a file containing custom msg to display when users log in. By default, it is commented out as #Banner /etc/issue.net.

Banner /etc/motd.d/custom.banner

simple way to hide all

To hide all message after password prompt, just create a empty file named .hushlogin in your $HOME folder. Next Time you log in, nothing will be printed.

~ $ touch .hushlogin

Hide SSH Welcome Banner/Message on Ubuntu14.04+的更多相关文章

  1. Ubuntu14.04下完美安装cloudermanage多种方式(图文详解)(博主推荐)

    说在前面的话 我的机器是总共4台,分别为ubuntucmbigdata1.ubuntucmbigdata2.ubuntucmbigdata3和ubuntucmbigdata4. ClouderaMan ...

  2. Ubuntu14.04解决远程root-ssh拒绝登录

    (1)查看ip地址是否冲突 我在单位的虚拟机ip地址是192.168.14.85,与其它机器冲突了.改成了192.168.14.83 (2)关闭Ubuntu14.04的防火墙 root@stgman- ...

  3. LNMP虚拟机开发环境配置--vagrant+virtualbox+ubuntu14.04

    工作一直用的是别人打包好的虚拟机开发环境,感觉确实很酷.所以准备自己配个开发环境,为之后自己开发一些有趣的东西做准备. ok,开始~~~ 一.安装软件 vagrant和virtualbox 此处需注意 ...

  4. 搭建ubuntu14.04的hadoop集群【docker容器充当服务器】

    首先弄出来装有hadoop.java.ssh.vim的镜像起名badboyf/hadoop.做镜像有两种方法,一种是用Dockerfile来生成一个镜像,一种是基于ubuntu14.04的基础镜像生成 ...

  5. Ubuntu14.04+RabbitMQ3.6.3+Golang的最佳实践

    目录 [TOC] 1.RabbitMQ介绍 1.1.什么是RabbitMQ?   RabbitMQ 是由 LShift 提供的一个 Advanced Message Queuing Protocol ...

  6. Ubuntu14.04用apt在线/离线安装CDH5.1.2[Apache Hadoop 2.3.0]

    目录 [TOC] 1.CDH介绍 1.1.什么是CDH和CM? CDH一个对Apache Hadoop的集成环境的封装,可以使用Cloudera Manager进行自动化安装. Cloudera-Ma ...

  7. Ubuntu14.04安装ROOT集群

    之前尝试在CentOS7上部署ROOT集群,却发现无论是源码包安装,还是官方提供的二进制包,都缺少了关键的xproofd可执行文件,导致PoD不能运行.没有办法,只能尝试在其他OS上部署,这里我选择了 ...

  8. Ubuntu14.04下安装Hadoop2.5.1 (单机模式)

    本文地址:http://www.cnblogs.com/archimedes/p/hadoop-standalone-mode.html,转载请注明源地址. 欢迎关注我的个人博客:www.wuyudo ...

  9. 在ubuntu14.04上配置cuda_caffe_cudnn_anaconda_digits

    参考网上的很多网站,以这篇为主:http://blog.csdn.net/yhl_leo/article/details/50961542 这篇算是自己对caffe学习的一个总结系列的开头.首先因为c ...

随机推荐

  1. Objective-C的新特性

    Objective-C的新特性 苹果在今年的 WWDC2012 大会上介绍了大量 Objective-C 的新特性,能够帮助 iOS 程序员更加高效地编写代码.在不久前更新的 Xcode4.4 版本中 ...

  2. 远程访问mysql

    转载:http://www.codesky.net/article/201108/106005.html 数据库不允许从远程访问怎么办?本文提供了三种解决方法: 1.改表法.可能是你的帐号不允许从远程 ...

  3. CentOS安装开发组相关的包

    yum groupinstall "Development Tools"   yum groupremove "Development Tools"

  4. [转载]QQ通讯原理及QQ是怎么穿透内网的

    QQ是一个基于TCP/UDP协议的通讯软件 发送消息的时候是UDP打洞,登陆的时候使用HTTP~因为登陆服务器其实就是一个HTTP服务器,只不过不是常用的那些,那个服务器是腾讯自行开发的!!! 一.登 ...

  5. json 输出中文乱码解决办法

    echo json_decode(json_encode("修改成功")); 这样就行了

  6. js 页码分页的前端写法

    <script type="text/javascript"> var curPage = 1;//当前页码 var total;//总页数 $(function () ...

  7. FileIOUtils.java

    package com.vcredit.ddcash.batch.util; import com.vcredit.ddcash.batch.autoAdvance.AutoAdvanceTask;i ...

  8. Linux下一些有用的指令

    1.   安装源代码包用到的configure 这用来定位安装位置. 用法: ./configure -prefix=<安装目录>,  前提是文件中有configure执行文件.

  9. Otsu algorithm

    一.介绍 OTSU算法也称最大类间差法,有时也称之为大津算法,被认为是图像分割中阈值选取的最佳算法,计算简单,不受图像亮度和对比度的影响,因此在数字图像处理上得到了广泛的应用.它是按图像的灰度特性,将 ...

  10. 使用JAXP对XML文档进行DOM解析

    import java.io.FileOutputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers. ...