Jan
8
有客户咨询,想修改客户端登陆到telnet服务器上时显示的信息。这涉及到/etc/issue.net和/etc/motd两个文件。
一、默认显示
服务端操作系统是,红旗 Asianux 3 for x86。
如下所示,红色标记的就是默认显示信息:
二、修改默认显示
废话不说了,直接看演示吧。服务器上执行:
也允许使用一些变量,如\d表示时间:
结果:
另外,/etc/motd是用户登陆后的提示信息,适用于包括shell登陆和ftp登陆等。如:
一、默认显示
服务端操作系统是,红旗 Asianux 3 for x86。
如下所示,红色标记的就是默认显示信息:
引用
# telnet 192.168.228.233
Trying 192.168.228.233...
Connected to 192.168.228.233 (192.168.228.233).
Escape character is '^]'.
Asianux Server 3 (Quartet)
Kernel 2.6.18-8.10AX on an i686
login: linuxing
Password:
[linuxing@AX3test ~]$
Trying 192.168.228.233...
Connected to 192.168.228.233 (192.168.228.233).
Escape character is '^]'.
Asianux Server 3 (Quartet)
Kernel 2.6.18-8.10AX on an i686
login: linuxing
Password:
[linuxing@AX3test ~]$
二、修改默认显示
废话不说了,直接看演示吧。服务器上执行:
# echo "Welcome to www.inuxfly.org" >> /etc/issue.net
# echo "Hello,my friend." >> /etc/motd
客户端登陆:# echo "Hello,my friend." >> /etc/motd
引用
# telnet 192.168.228.233
Trying 192.168.228.233...
Connected to 192.168.228.233 (192.168.228.233).
Escape character is '^]'.
Asianux Server 3 (Quartet)
Kernel 2.6.18-8.10AX on an i686
Welcome to www.inuxfly.org
login: linuxing
Password:
Last login: Thu Jan 8 17:35:30 from ftpserver
Hello,my friend.
[linuxing@AX3test ~]$
Trying 192.168.228.233...
Connected to 192.168.228.233 (192.168.228.233).
Escape character is '^]'.
Asianux Server 3 (Quartet)
Kernel 2.6.18-8.10AX on an i686
Welcome to www.inuxfly.org
login: linuxing
Password:
Last login: Thu Jan 8 17:35:30 from ftpserver
Hello,my friend.
[linuxing@AX3test ~]$
也允许使用一些变量,如\d表示时间:
引用
# cat /etc/issue.net
Asianux Server 3 (Quartet)
Kernel \r on an \m
Welcome to www.inuxfly.org
Login in time \d
Asianux Server 3 (Quartet)
Kernel \r on an \m
Welcome to www.inuxfly.org
Login in time \d
结果:
引用
# telnet 192.168.228.233
Trying 192.168.228.233...
Connected to 192.168.228.233 (192.168.228.233).
Escape character is '^]'.
Asianux Server 3 (Quartet)
Kernel 2.6.18-8.10AX on an i686
Welcome to www.inuxfly.org
Login in time 17:45 on Thursday, 08 January 2009
login:
telnet> quit
Connection closed.
Trying 192.168.228.233...
Connected to 192.168.228.233 (192.168.228.233).
Escape character is '^]'.
Asianux Server 3 (Quartet)
Kernel 2.6.18-8.10AX on an i686
Welcome to www.inuxfly.org
Login in time 17:45 on Thursday, 08 January 2009
login:
telnet> quit
Connection closed.
另外,/etc/motd是用户登陆后的提示信息,适用于包括shell登陆和ftp登陆等。如:
引用
# ssh 192.168.228.233
The authenticity of host '192.168.228.233 (192.168.228.233)' can't be established.
RSA key fingerprint is 25:96:61:32:68:75:74:a9:1d:7b:2e:a1:f1:b6:cc:a7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.228.233' (RSA) to the list of known hosts.
root@192.168.228.233's password:
Last login: Thu Jan 8 13:28:31 2009 from 192.168.228.247
Hello,my friend.
[root@AX3test ~]#
The authenticity of host '192.168.228.233 (192.168.228.233)' can't be established.
RSA key fingerprint is 25:96:61:32:68:75:74:a9:1d:7b:2e:a1:f1:b6:cc:a7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.228.233' (RSA) to the list of known hosts.
root@192.168.228.233's password:
Last login: Thu Jan 8 13:28:31 2009 from 192.168.228.247
Hello,my friend.
[root@AX3test ~]#