telnet: connect to address 127.0.0.1: Connection refused
telnet协议是TCP/IP协议族中的一员,是Internet远程登陆服务的标准协议和主要方式。它为用户提供了在本地计算机上完成远程主机工作的能力。在终端使用者的电脑上使用telnet程序,用它连接到服务器。
一、检测telnet-server的rpm包是否安装
OS:RedHat9
[root@locahost ~]#rpm -qa telnet-server
//出于安全考虑telnet-server.rpm是默认没有安装的,而telnet的客户端是标配。即下面的软件是默认安装的,为了方便测试,也确认一下//
[root@locahost ~]#rpm -qa telnet
telnet-0.17-25
如果没有安装,请安装telnet-server
第3张盘上有telnet-server-0.17-25.i386.rpm,进入Server目录下执行
[root@locahost ~]#rpm -ivh telnet-server*.i386.rpm
二、重新启动xinetd守护进程
由于telnet服务也是由xinetd守护的,所以安装完telnet-server,要启动telnet服务就必须重新启动xinetd
[root@locahost ~]#service xinetd restart
三、测试一下
我们先来查看TCP的23端口是否开启正常
[root@locahost ~]#netstat -tnl |grep 23
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
如果上面的一行存在就说明服务已经运行了
这时我们可以本机通过进一步确认一下
[root@locahost ~]# telnet localhost 23
Trying telnet 127.0.0.1…
Connected to localhost.localdomain (127.0.0.1)..
Escape character is ‘^]’.
Red Hat Linux release 9 (Shrike)
Kernel 2.4.20-8 on an i686
login:
如果netstat命令没有返回内容,我们就只好继续进行更深入的配置了。
四、排除可能出现的问题
修改telnet服务配置文件
vi /etc/xinetd.d/telnet
service telnet
{
disable = yes
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
将disable=yes行前加#注释掉,或者把yes改为no,之后重新启动xinetd扩展守护进程
[root@localhost ~]# service xinetd restart
停止 xinetd: [确定]
启动 xinetd: [确定]
注意关闭系统防火墙对23端口的限制。
[root@localhost ~]# system-config-securitylevel
在这里我们可以开启或关闭防火墙,也可以配置防火墙
或者:
[root@locahost ~]# setup
Connection refused
有可能服务没开,有可能防火墙禁了端口。
你自己排查吧。
可以参考下这里
http://blog.csdn.net/CenturyMagus/archive/2007/09/12/1782819.aspx
http://topic.csdn.net/u/20090520/16/496930da-cd37-485e-a5ee-2e4303e1bc98.html
原文:http://blog.csdn.net/naughty610/article/details/5724181
telnet: connect to address 127.0.0.1: Connection refused的更多相关文章
- centos解决bash: telnet: command not found...&& telnet: connect to address 127.0.0.1: Connection refused拒绝连接
检查telnet是否已安装: [root@hostuser src]# rpm -q telnet-serverpackage telnet-server is not installed[root@ ...
- 解决telnet: connect to address 127.0.0.1: Connection refused的错误信息问题
1.检查telnet是否已安装: rpm -qa telnet 2.有输出说明已安装,如果没有输出则没有安装,使用yum install telnet进行安装 3.检查telnet-server是否已 ...
- rndc: connect failed: 127.0.0.1#953: connection refused
[root@localhost sbin]# ./named -v bind 9.5.1-p3-v3.0.9 问题现象: [root@localhost sbin]# ./rndc flush -p ...
- connect failed: 127.0.0.1#953: connection refused
Problem1 : root@jeremy-VirtualBox:/etc/bind# /etc/init.d/bind9 restart * Stopping domain name servic ...
- Redis 服务端配置——Could not connect to Redis at 127.0.0.1:6379: Connection refused
[root@centoszang 桌面]# redis-cli Could : Connection refused Could : Connection refused not connected& ...
- 在 Linux redis 验证交互连接过程中遇到 redis Could not connect to Redis at 127.0.0.1:6379: Connection refused 的解决方法
Could not connect to Redis at 127.0.0.1:6379: Connection refused 1.找到redis.conf 并修改 daemonize no 为 d ...
- redis Could not connect to Redis at 127.0.0.1:6379: Connection refused 问题解决
1.启动redis 客户端 redis-cli 报错 redis Could not connect to Redis at 127.0.0.1:6379: Connection refused 是因 ...
- Could not connect to Redis at 127.0.0.1:6379: Connection refused
启动redis: redis-server ../redis.conf redis启动成功后 执行命令行redis-cli报:Could not connect to Redis at 127.0. ...
- [Redis-CentOS7]Redis打开远程连接(十) Could not connect to Redis at 127.0.0.1:6379: Connection refused
通过网络无法访问Redis redis-cli 172.16.1.111 Could not connect to Redis at 127.0.0.1:6379: Connection refuse ...
随机推荐
- CSS3的transition动画功能
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- wpf 拖图片到窗体
前台代码:<Window x:Class="拖拽.MainWindow" xmlns="http://schemas.microsoft.com/wi ...
- 非阻塞socket学习,select基本用法
server #include <stdio.h> #include <winsock2.h> #include <iostream> #pragma commen ...
- git config --global core.autocrlf false
git config --global core.autocrlf false warning: LF will be replaced by CRLF in .idea/vcs.xml.The f ...
- bs4_2
QQ:231469242 欢迎交流 Parsing HTML with the BeautifulSoup Module Beautiful Soup是用于提取HTML网页信息的模板,Beautif ...
- Spring解析实践
这几天重新把传智播客的黎活明的Spring2.5的教程学习了一遍,跟着上面的解析Spring的过程跟着制作了一个简单的Spring IOC和Spring AOP,先在贴上来给大家参考一下. 1:管理B ...
- jquery id选择器 id带"."问题
例如控件ID为user.id 使用$("#user.id")不能得到正确的结果 必须使用\\转义 即$("#user\\.id")
- codeforces 712B. Memory and Trident
题目链接:http://codeforces.com/problemset/problem/712/B 题目大意: 给出一个字符串(由'U''D''L''R'),分别是向上.向下.向左.向右一个单位, ...
- thinkphp新增
$m = M('content'); //与 $m = new Model('content')效果一样 $date = array( 'username' => I('username', ...
- setTimeout 导致的浏览器假死
问题 前几天,同事遇到一个浏览器假死的问题.就是浏览器在响应一个请求的时候,就突然不响应时间,进入假死状态,Cup也飙升到100%. 但是这个问题只出现在IE浏览器,chrome和Firefox等 ...