centos解决bash: telnet: command not found...&& telnet: connect to address 127.0.0.1: Connection refused拒绝连接
检查telnet是否已安装:
[root@hostuser src]# rpm -q telnet-server
package telnet-server is not installed
[root@hostuser src]# telnet 192.168.81.129
bash: telnet: command not found...
rpm -qa |grep telnet
没有则安装,有跳过
yum install telnet-server -y && yum install telnet.* -y
启动telnet 服务
[root@hostuser src]# sudo service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service
确认启动telnet服务
[root@hostuser xinetd.d]# ps -ef | grep xinetd
root 33139 1 0 12:11 ? 00:00:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid
root 35218 30125 0 12:27 pts/0 00:00:00 grep --color=auto xinetd
尝试一下
[root@hostuser src]# telnet localhost
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
[root@hostuser src]# netstat -tnl |grep 23
没反应检查telnet默认端口23不在开通防火墙23端口
开放23端口
firewall-cmd --zone=public --add-port=23/tcp --permanent
重启防火墙
firewall-cmd --reload
检查端口开启23情况
[root@hostuser xinetd.d]# firewall-cmd --zone=public --list-ports
8989/tcp 8686/tcp 40127/tcp 23/tcp
再尝试一下
[root@hostuser src]# telnet localhost
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
检查 cd /etc/xinetd.d
检查telnet文件存不存在,不存在touch telnet
vi /etc/xinetd.d/telnet
添加
#default:yes
# description: The telnet server servestelnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server =/usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
若存在直接修改
disable = no
然后重启 xinetd
[root@hostuser src]# sudo service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service
设置xinetd开机自启动:
systemctl enable xinetd.service
检查telnet效果
[root@hostuser xinetd.d]# telnet localhost
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Kernel 3.10.0-957.10.1.el7.x86_64 on an x86_64
hostuser login:
问题解决
centos解决bash: telnet: command not found...&& telnet: connect to address 127.0.0.1: Connection refused拒绝连接的更多相关文章
- Centos出现-bash: unzip: command not found的解决办法
利用unzip命令解压缩的时候,出现-bash: unzip: command not found的错误. unzip——命令没有找到,其原因肯定是没有安装unzip. 利用一句命令就可以解决了. ...
- Centos提示-bash: make: command not found的解决办法
一般出现这个-bash: make: command not found提示,是因为安装系统的时候使用的是最小化mini安装,系统没有安装make.vim等常用命令,直接yum安装下即可: yum - ...
- 解决-bash: lsb_release: command not found
今天想判断系统版本,没想到没有lsb_release,lsb_release是查看系统版本信息的工具.当然我们也可以用其他的命令来解决,但这个问题还是解决掉. 系统:centos 6.41.先检查有没 ...
- centOS出现 -bash: vim: command not found
问题描述 用centos 的主机的時候, 用 vim 时出现 -bash: vim: command not found. 只能使用 vi. 那么如何安裝 vim 呢? 解决步骤 1.查看是否安装 输 ...
- 解決 centos中-bash: vim: command not found
用centos 的主机的時候, 用 vim 时出现 -bash: vim: command not found. 只能使用 vi. 那么如何安裝 vim 呢? 输入 rpm -qa|grep vim ...
- CentOS系统bash: groupadd: command not found问题
如果我们需要在CentOS执行新建用户组命令的时候,需要进入到ROOT权限,如果你用以下命令: 1 su2 su root 进入到ROOT账户,那么会出现上述的错误信息:“bash: groupadd ...
- 解决 bash: vue command not found
背景 : win10 使用 yarn 全局 安装 vue/cli 后 yarn global add @vue/cli 提示安装成功 使用vue create 提示 bash: ...
- 解决bash: mysql: command not found 的方法
root@DB-02 ~]# mysql -u root-bash: mysql: command not found 原因:这是由于系统默认会查找/usr/bin下的命令,如果这个命令不在这个目录下 ...
- linux环境中iostat命令的安装,解决-bash: iostat: command not found问题
需求说明: 今天在测试环境的主机上,准备通过iostat来查看系统的io情况,发现没有该命令 [root@testvm Packages]# iostat -bash: iostat: command ...
随机推荐
- 如何预测股票分析--长短期记忆网络(LSTM)
在上一篇中,我们回顾了先知的方法,但是在这个案例中表现也不是特别突出,今天介绍的是著名的l s t m算法,在时间序列中解决了传统r n n算法梯度消失问题的的它这一次还会有令人杰出的表现吗? 长短期 ...
- 安装VMware Tools和设置屏幕
在虚拟机窗口的虚拟机-安装VMware Tools,点击安装,直到安装完成,出现以下界面 在主文件夹中新建VM文件夹,将VMware Tools中的VMwareTools-10.0.10-430167 ...
- Jmeter学习之-聚合报告详解
在对接口进行性能测试时,经常用到jmeter的聚合报告来分析数据 首先在待测试的接口或线程组下添加“监听器>聚合报告” 执行请求后,将生成聚合报告,聚合报告包括以下结果参数(中文版+英文版) A ...
- git 本地回滚与远程库回滚
不说废话,开始: 一.本地回滚: git reset --hard commit-id //回滚到commit-id 二.远程回滚操作分3步:①将本地分支退回到某个commit ②删除远程分支 ...
- LUA利用第三方API访问数据库
===========数据库访问--第三方 http { upstream backend { drizzle_server 192.168.4.119:3306 protocol=mysql dbn ...
- Stylus-import
Stylus Import Disclaimer: In all places the @import is used with Stylus sheets, the @require could b ...
- MSYS2与mingw32和mingw64的安装
由于编译OpenBLAS接触到MSYS2. 下载MSYS:https://mirror.tuna.tsinghua.edu.cn/help/msys2/ 安装,并按照下面的配置,然后可以安装mingw ...
- caffe_ocr开源项目学习笔记
本机配置cuda8.0使用的cudnn是下面要说的重点,vs2015,win10,1080Ti 下载了开源项目:https://github.com/senlinuc/caffe_ocr 编译的时候报 ...
- Windows使用nmake和Makefile编译c++
今天在本地看到一个lsd_1.6的源文件,不知道什么时候看LSD时下载的,里面只有一个Makefile和源文件. 想到在Linux下可以只用一个make命令就可以得到可执行程序,在Windows下是不 ...
- Codeforces Round #621 (Div. 1 + Div. 2) D
题意: 给n,m,k,有n个点,m条线,距离都是一: 有k个特殊点,选择其中两个,进行相连,距离变为1,使得原本的最短路,经过相连改变小或者不变,最终结果是所有结果里面的最大距离. 思路: 选择i,j ...