armbian平台ubuntu环境下telnet安装及启动,给pantherX2增加一个应急通道

armbian平台ubuntu环境下telnet安装及启动,给pantherX2增加一个应急通道

一、首先查看telnet运行状态

#netstat -a | grep telnet

bash 复制代码
输出为空,表示没有开启该服务

这个可以不运行,有的没有安装netstat命令

二、安装openbsd-inetd 和 telnetd

bash 复制代码
apt-get install openbsd-inetd
apt-get install apt-utils
apt-get install telnetd
apt-get install xinetd
apt-get install telnet

三、修改配置,nano /etc/xinetd.d/telnet,填入以下内容

bash 复制代码
service telnet
{
    disable = no
    flags = REUSE
    socket_type = stream
    wait = no
    user = root
    server = /usr/sbin/in.telnetd
    server_args = -h
    log_on_failure += USERID
}

四、开启root用户,修改etc/pam.d/login

bash 复制代码
nano etc/pam.d/login
用#号注释掉pam_securetty.so所在行

五、自启动文件及重启生效

启动文件在/etc/systemd/system/multi-user.target.wants/inetd.service

bash 复制代码
[Unit]
Description=Internet superserver
Documentation=man:inetd(8)
After=network-online.target
Wants=network-online.target
ConditionPathExists=/etc/inetd.conf

[Service]
Type=notify
ExecStart=/usr/sbin/inetd
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
WatchdogSec=5
KillMode=process

[Install]
WantedBy=multi-user.target

重启

bash 复制代码
systemctl restart inetd
相关推荐
旺仔.2917 小时前
僵死进程及Linux文件操作 详解
linux·运维·服务器
IMPYLH7 小时前
Linux 的 comm 命令
linux·运维·算法
淡泊if7 小时前
1.2GB → 98MB,我的 Docker 镜像瘦身实战记录
运维·docker·容器
Sst的头号粉丝7 小时前
Docker——cgroups
运维·docker·容器
薛定谔的悦7 小时前
嵌入式设备OTA升级实战:从MQTT命令到自动重启的全流程解析
linux·算法·ota·ems
2501_918126918 小时前
学习所有6502写游戏控制器的语句
java·linux·网络·汇编·嵌入式硬件
JuckenBoy8 小时前
Linux环境安装SGLang框架运行自选大模型(以Rocky9.7为例)
linux·运维·大模型·qwen·rocky·deepseek·sglang
十巷无终8 小时前
Kali Virtual Machines(虚拟机镜像)安装后问题及解决办法
linux·运维·服务器
赵民勇8 小时前
gtkmm库之GtkWindow与ApplicationWindow用法详解
linux·c++
BestOrNothing_20158 小时前
(4)Ubuntu 22.04 安装后使用 GParted 重新分区实战记录
linux·gparted·ubuntu22.04·ubuntu磁盘分区