linux ssh motd 颜色,ubuntu ssh登录的时候motd被打印了两次

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

一台ubuntu server的服务器,登录时发现motd信息被打印了两次:

Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)

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

System information as of Thu Jul 17 11:40:27 CST 2014

System load: 0.06 Processes: 200

Usage of /: 38.3% of 454.39GB Users logged in: 0

Memory usage: 30% IP address for eth0: 192.168.1.188

Swap usage: 0%

Graph this data and manage this system at:

https://landscape.canonical.com/

Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)

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

System information as of Thu Jul 17 14:21:05 CST 2014

System load: 0.05 Processes: 198

Usage of /: 38.3% of 454.39GB Users logged in: 0

Memory usage: 33% IP address for eth0: 192.168.1.188

Swap usage: 0%

Graph this data and manage this system at:

https://landscape.canonical.com/

No mail.

Last login: Thu Jul 17 11:40:28 2014 from 192.168.1.39

mz@s406ok988:~$

但是我查了一下motd(软连接到/var/run/motd)是没问题的

mz@s406ok988:~$ ll /etc/motd

lrwxrwxrwx 1 root root 21 7月 17 11:34 /etc/motd -> /var/run/motd.dynamic

mz@s406ok988:~$ cat /etc/motd

Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)

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

System information as of Thu Jul 17 14:21:05 CST 2014

System load: 0.05 Processes: 198

Usage of /: 38.3% of 454.39GB Users logged in: 0

Memory usage: 33% IP address for eth0: 192.168.1.188

Swap usage: 0%

Graph this data and manage this system at:

https://landscape.canonical.com/

mz@s406ok988:~$ run-parts /etc/update-motd.d/

Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)

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

System information as of 2014年 07月 17日 星期四 14:25:12 CST

System load: 0.0 Processes: 199

Usage of /: 38.3% of 454.39GB Users logged in: 1

Memory usage: 33% IP address for eth0: 192.168.1.188

Swap usage: 0%

Graph this data and manage this system at:

https://landscape.canonical.com/

mz@s406ok988:~$

可以看到motd的内容是没问题的,并且试了下run-parts,显示输出也对。

mz@s406ok988:~$ run-parts /etc/update-motd.d/

Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-32-generic x86_64)

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

System information as of 2014年 07月 17日 星期四 14:25:12 CST

System load: 0.0 Processes: 199

Usage of /: 38.3% of 454.39GB Users logged in: 1

Memory usage: 33% IP address for eth0: 192.168.1.188

Swap usage: 0%

Graph this data and manage this system at:

https://landscape.canonical.com/

mz@s406ok988:~$

不明白为什么登录的时候motd被打印了两次。同样的线上服务器,也是这么配置的,但是有的服务器正常,有的服务器也出现了motd被打印两次,不知道怎么回事

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值