`
wsql
  • 浏览: 11780584 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

linux开启telnet服务

 
阅读更多


1。基础知识
linux提供服务是由运行在后台的守护程序(daemon)来执行的。
守护进程的工作就是打开1个端口(port),等待(listen)进入的连接。

在C/S模式中,如果客户提请了1个连接,守护进程就创建(fork)子进程来响应这个连接,而父进程继续监听其他服务的请求。
但是,对于系统所提供的每1个服务,如果都必须运行1个监听某个端口连接发生的守护程序,那么通常意味着系统资源的浪费。

为此,引入“扩展的网络守护进程服务程序”xinetd(xinetd internet daemon)。telnet服务也是由xinetd守护的。

2。检测telnet、telnet-server的rpm包是否安装
[root@localhost ~]# rpm -qa telnet
telnet-0.17-39.el5
//telnet*.rpm是默认安装的//
[root@localhost root]#rpm -qa telnet-server

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

3。安装telnet-server
[root@localhost ~]# rpm -qa telnet-server
[root@localhost ~]# rpm -ivh /mnt/Server/telnet-server-0.17-39.el5.i386.rpm
warning: /mnt/Server/telnet-server-0.17-39.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:telnet-server ########################################### [100%]
[root@localhost ~]#
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

5。重新启动xinetd守护进程
由于telnet服务也是由xinetd守护的,所以安装完telnet-server,要启动telnet服务就必须重新启动xinetd
[root@localhost root]#service xinetd restart

[root@localhost root]#/etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
6。关闭系统的防火墙
linux系统默认的防火墙是“high”

命令行界面CLI:
[root@localhost root]# setup
选择:“firewall configuration”
选择:security level——“no firewall”

7。测试
telnet IP地址。

Enterprise Linux Enterprise Linux Server release 5.4 (Carthage)
Kernel 2.6.18-164.el5xen on an i686
login: oracle
Password:
[oracle@localhost ~]$


8。telnet默认开机启动
1)。命令ntsysv
找到telnet,用空格键激活(*)服务
2)。命令chkconfig
chkconfig --add telnet
chkconfig telnet on

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics