telnet連接

1、被連接的系統新建用戶:

Linux:CentOS7.4新建用戶並授權

2、安裝telnet並啓動服務

yum -y install telnet-server.x86_64
yum -y install telnet.x86_64
yum -y install xinetd.x86_64

vim /etc/securetty
最後一行添加:pts/0 和 pts/1

systemctl enable xinetd.service
systemctl enable telnet.socket

systemctl start telnet.socket
systemctl start xinetd

開放23端口號
firewall-cmd --permanent --add-port=23/tcp
firewall-cmd --reload

查看Telnet的日誌信息
tail -f /var/log/secure

3、telnet連接:

4、修改歡迎語和登錄後提示語句:

/etc/issue #登錄前提示
/etc/motd #登錄後提示

歡迎語:

vim /etc/issue.net


================================= welcome to 192.168.194.6 ============================== 
machine:\m
time:\t
date:\d
for:\n
[root@localhost ~]# cat /etc/motd

                  _oo0oo_
                 088888880
                 88" . "88
                 (| -_- |)
                  0\ = /0
               ___/'---'\___
             .' \\\\| |//// '.
            / \\\\|||:|||//// \
           /_ ||||| -:- ||||| _\
          |   | \\\\\-///// |   |
          | \_|  ''\---/''  |_/ |
          \  .-\__  '-'  __/-.  /
        ___'. .'  /--.--\  '. .'___
     ."" '<  '.___\_<|>_/___.' >'  "".
    | | : '-  \'.;'\ _ /';.'/ - ' : | |
    \  \ '_.   \_ __\ /__ _/   ._' /  /
====='-.____'.___ \_____/___.-'____.-'=====
 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        好好學習            天天向上

=============  login success  ===========

效果圖:

 

 

 

 

 

常見問題:

1、修改linux密碼的時候提示我user not known to the underlying authentication module

#passwd  XXXXX      //XXXXX爲帳號

New UNIX password:
Retype new UNIX password:
passwd: User not known to the underlying authentication module

這個時候可能是/etc/passwd和/etc/shadow 內容不一致的問題,使用pwconv同步下。

在單用戶下輸入:pwconv,然後重新設置密碼就能成功了!

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章