telnet: connect to address 127.0.0.1: Connection refused
来源:互联网 发布:防止sql注入的函数php 编辑:程序博客网 时间:2024/06/05 17:34
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
一、检测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://hi.baidu.com/lhjtc8257/item/fd8b4616ebe5b36e70d5e866转载
- telnet: connect to address 127.0.0.1: Connection refused
- 【转载】telnet: connect to address 127.0.0.1: Connection refused
- telnet: connect to address 127.0.0.1: Connection refused
- telnet: connect to address 127.0.0.1: Connection refused
- telnet: connect to address 127.0.0.1: Connection refused问题
- telnet: connect to address 127.0.0.1: Connection refused解决
- telnet 安装---telnet: connect to address 127.0.0.1: Connection refused问题 ----
- 解决telnet: connect to address 127.0.0.1: Connection refused的错误信息(2)
- telnet: connect to address 192.168.1.103: Connection refused
- 阿里云安装svn失败,提示telnet: connect to address Connection refused的解决办法
- ssh: connect to host 127.0.0.1 port 2222: Connection refused
- UE4 connect to 127.0.0.1 port 52314 failed: Connection refused)
- linux telnet 之 telnet: Unable to connect to remote host: Connection refused
- linux memcached telnet 出现 Connection refused ,Unable to connect to remote host
- Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused(MongoDB启动异常)
- 【git使用】Failed to connect to 127.0.0.1 port 1080: Connection refused
- Redis 服务端配置——Could not connect to Redis at 127.0.0.1:6379: Connection refused
- Redis连接时报错:Could not connect to Redis at 127.0.0.1:6379: Connection refused
- 作为一个新手,怎么学呢
- 数组
- ArcGIS 10.0简单安装方法及ArcGIS其他组件使用相关问题
- mini2440之led模块的动态加载及相应led应用程序的编写
- 人工智能、机器学习、数据挖掘、知识发现的国际顶级会议排名榜
- telnet: connect to address 127.0.0.1: Connection refused
- C++编程兵书
- CreateFileMaping
- 如何使用动态数组
- ubuntu 12.04 配置nginx,mysql,php
- android基础控件-弹出对话框的实现
- 向脚本传递参数和位置变量
- svn备份脚本每天
- 简单文本操作之去掉重复行sort 和uniq