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. CSS3是怎么实现全景特效?

    很有意思的全景动画:(直接上代码) html部分: <div class="panorama"></div> css部分: .panorama{ width ...

  2. 1047. Student List for Course (25)

    Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course li ...

  3. [LintCode] House Robber 打家劫舍

    You are a professional robber planning to rob houses along a street. Each house has a certain amount ...

  4. ArcGIS AddIN之工具不可用

    AddIN做的工具,第一次打开时工具亮起(可用),第一次点击之后工具就灰掉(不可用) 原因:该工具没有找到响应函数 具体原因:之前做的好多工具,好多个项目,好多代码.现在统一放到一个项目中,一个工具条 ...

  5. jquery 的datatables插件问题

      翻页后js失效: 重绘事件-当表格重绘完成后 重新绑定事件: draw.dt $('#example').dataTable(); $('#example').on( 'draw.dt', fun ...

  6. 网络性能测试工具iperf详细使用图文教程

      Iperf是一个网络性能测试工具.Iperf可以测试TCP和UDP带宽质量.Iperf可以测量最大TCP带宽,具有多种参数和UDP特性. Iperf可以报告带宽,延迟抖动和数据包丢失.利用Iper ...

  7. IOS第11天(2:UIPickerView自定义国旗选择)

    国旗选择 #import "HMViewController.h" #import "HMFlag.h" #import "HMFlagView.h& ...

  8. php如何遍历多维的stdClass Object 对象,php的转换成数组的函数只能转换外面一丛数组

    php如何遍历多维的stdClass Object 对象,php的转换成数组的函数只能转换外面一丛数组 (2012-09-10 19:58:49) 标签: 杂谈 分类: 网页基础知识 php如何遍历多 ...

  9. JS判断终端设备跳转PC端、移动端相应的URL

    <!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta nam ...

  10. 用GSON解析Json格式数据

    GSON是谷歌提供的开源库,用来解析Json格式的数据,非常好用.如果要使用GSON的话,则要先下载gson-2.2.4.jar这个文件,如果是在Android项目中使用,则在Android项目的li ...