telnet连接

本文介绍了如何在Linux CentOS7.4中进行telnet连接,包括新建用户、安装并启动telnet服务、自定义登录前后提示信息,以及解决密码修改时遇到的常见问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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,然后重新设置密码就能成功了!

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值