Linux Telnet服务开启

来源:互联网 发布:金百福珠宝软件破解版 编辑:程序博客网 时间:2024/05/01 16:27

今天公司有个同事弄了个Red Hat Enterprise 5装,系统装好后,发现telnet不能用,ssh是可以的。搞了好久,才给搞定,结合以前摘下的关于这方面的资料,参考如下:

是,对于系统所提供的每1个服务,如果都必须运行1个监听某个端口连接发生的守护程序,那么通常意味着系统资源的浪费。为此,引入扩展的网络守护进程服 务程序”xinetdxinetd internet daemon)。telnet服务也是由xinetd守护的。

2。检测telnettelnet-serverrpm包是否安装

OSRedHat9

[root@localhost root]#rpm -qa telnet

telnet-0.17-25 //telnet*.rpm是默认安装的//

[root@localhost root]#rpm -qa telnet-server

//telnet*.rpm是默认没有安装的//

3。安装telnet-server3张盘上有telnet-server-0.17-25.i386.rpm [root@localhost root]#rpm -ivh telnet-server*.i386.rpm  --这个软件包依赖于xinet这个包。

4。修改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行前加#,或者改为disable=no

PS

安装telnet-server后,系统才有文件/usr/sbin/in.telnetd

5。重新启动xinetd守护进程由于telnet服务也是由xinetd守护的,所以安装完telnet-server,要启动telnet服务就必须重新启动xinetd

[root@localhost root]#service xinetd restart

[root@localhost root]#/etc/init.d/xinetd restart

6。关闭系统的防火墙,如果不能修改,则先修改下用户认证方式再试试(setup ->  Authentication configuration) Linux系统默认的防火墙是“high”

命令行界面CLI

[root@localhost root]# setup

选择:“firewall configuration”

选择:security level——“no firewall”

# cat /etc/securetty

console

vc/1

vc/2

vc/3

vc/4

vc/5

tty1

tty2

tty3

tty4

tty5

tty6

pts/0

pts/1

pts/2

pts/3

8。测试

c:> telnet IP

Trying...

Connected to IP

Escape character is '^]'.

Red Hat Enterprise Linux Server release 5 (Tikanga)

Kernel 2.6.18-8.el5 on an i686

login:

chkconfig --add telnet

chkconfig telnet on

3)。图形用户界面GUI

redhat-conhat-config-services

主菜单”——“系统设置”——“服务器设置”——“服务

PS

由于telnet登陆时是明文传送密码,所以不安全,建议使用sshsecure shell)替代!

windows下一般用F-Secure SSH putty SSH

10Trouble Shooting

(1).我在我机子上输入 telnet 192.168.1.18 (装有Fedora Core 6 系统的机器)

dos提示:

Unencrypted connection refused.Goodbye.

失去了跟主机的连接

解决参考:

(2).red hat linux enterprise 5 在从别的机上telnet  过去时出现如下错误:(发出命令为: telnet 10.x.x.x)

getnameinfo: localhost: Success

Temporary failure in name resolution: Illegal seek

失去了跟主机的连接。

网上说只要在你的red hat linux enterprise 5host文件中增加telnet客户端的地址,例如10.200.1.130 clientmachine,但是加了也不行,解决参考如下:分析原因是red hat 5的用户认证鉴权方式比较严格,且也不能修改Firewall 的设置,只要把 Authentication configuration 里的一些选项去掉便可。

# setup

选择 Authentication configuration 去掉一些认证方式,然后再修改Firewall configuration里设置。

 

原创粉丝点击