阿里云ecs上centOS的名字太长了,然后看上去比较乱,于是,改一下名字:
[Abble@izuf60gbaaaq66y42r6y2fz root]$ hostnamectl set-hostname centOS7
==== AUTHENTICATING FOR org.freedesktop.hostname1.set-static-hostname ===
Authentication is required to set the statically configured local host name, as well as the pretty host name.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
[Abble@izuf60gbaaaq66y42r6y2fz root]$
改完后,重新ssh登陆:
➜ htdocs ssh Abble@139.196.98.111
Abble@139.196.98.111's password:
Last login: Sun May 6 00:32:58 2018
Welcome to Alibaba Cloud Elastic Compute Service !
[Abble@centos7 ~]$
[Abble@centos7 ~]$
[Abble@centos7 ~]$
还是新名字看着舒服。
附加:以前总认为linux上密码不出现*号是反人类设计,和thinkPHP3上的单字母函数平起平坐(虽然主流观点上有一大堆各种言之凿凿的理由)。但是,现在看上面的复制,总有一种莫名其妙的美感。
网友评论