Centos 开启telnet-service服务
1. 查看linux版本信息:
[loong@localhost ~]$ cat /etc/issue
CentOS release 5.8 (Final)
Kernel \r on an \m
2. 查看系统是否已安装telnet-server,linux系统上默认已经安装telnet-client(或telnet),而telnet-server需要手动安装。
[loong@localhost ~]$ rpm -qa | grep telnet
telent-server-xx
telnet-0.17-39.el5
3.如果上边显示已经有telent-server-xx若系统已安装,跳过此步。安装telnet-server。
方法一:下载RPM resource telnet-server,下载地址:http://rpmfind.net/linux/rpm2html/search.php?query=telnet-server
选择相应版本的telnet-server下载;
安装:# rpm -i telnet-server-0.17-39.el5.i386.rpm #貌似还得单独安装xinetd.
方法二:(推荐使用)
# yum install telnet-server
安装完成后:
[loong@localhost ~]$ rpm -qa | grep telnet
telnet-0.17-39.el5
telnet-server-0.17-39.el5
4. 启动telnet服务 (推荐方法三)
方法一:System->Administration->Services 中,
在On Demand Services中选中telnet,
并在Background Services中选中xinetd,并点击上面的Start,即在右侧显示:xinetd (pid 15986) is running...
最后Save & Quit.
方法二:编辑/etc/xinetd.d/telnet, 将其中的 disable = yes 的yes改为no.
修改后:
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
方法三:使用chkconfig命令直接开启
[root@localhost loong]# chkconfig telnet on
注:方法二和方法三,需要激活xinetd服务。方法如下:
[root@localhost loong]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
或:
[root@localhost loong]# /etc/rc.d/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
5. 测试服务
[root@localhost loong]# telnet localhost
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
CentOS release 5.8 (Final)
Kernel 2.6.18-308.1.1.el5 on an i686
login: loong
Password:
Last login: Tue Apr 24 16:42:06 from 10.108.14.135
[loong@localhost ~]$ exit
logout Connection closed by foreign host.
[root@localhost loong]#
到此 telnet Ctrl+]打开回显功能,enter即可
注:默认情况下,系统只允许普通用户telnet登录,不允许root用户登录。
要想获得root权限,可以使用普通用户登录,然后执行su,来获得root权限。
或使用一下方法,允许root登录telnet:
方法一:# mv /etc/securetty /etc/securetty.bak (不建议这种方法,测试完后再改回去吧!)
或先试图使用root用户登录,不成功,然后查看系统log:
telnet> o localhost
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
CentOS release 5.8 (Final)
Kernel 2.6.18-308.1.1.el5 on an i686
login: root
Password:
Login incorrect login:
Login incorrect login:
Login incorrect login:
Connection closed by foreign host.
[root@localhost loong]# tail -20 /var/log/secure
Apr 24 17:32:58 localhost login: pam_securetty(remote:auth): access denied: tty 'pts/1' is not secure !
Apr 24 17:33:03 localhost login: FAILED LOGIN 1 FROM localhost FOR root, Authentication failure
可以看到 access denied: tty 'pts/1' is not secure !
所以将‘pts/1’添加到/etc/securetty中,即可实现telnet的root用户登录。至于为什么?暂不清楚。
方法二:修改/etc/pam.d/remote,注释掉:auth required pam_securetty.so
1 #%PAM-1.0
2 #auth required pam_securetty.so
3 auth include system-auth
注:不建议开放telnet的root登录,容易带来安全隐患。
参考连接:
1. http://wenku.baidu.com/view/105544aedd3383c4bb4cd23d.html
2. http://www.5dlinux.com/article/9/2008/linux_16136.html
3. win7下使用telnet命令:http://wenku.baidu.com/view/f0ff731152d380eb62946d9d.html
Centos 开启telnet-service服务的更多相关文章
- CentOS开启telnet服务
原文地址:https://blog.csdn.net/zhujiangm/article/details/4540778 服务器:CentOS-5.1(192.168.1.87)客户机:FC6(192 ...
- Centos开启telnet/ssh/ftp/sftp服务
Telnet 开启telnet服务步骤: 1. 查看CentOS/Telnet_server版本:#cat /etc/issue, #rpm -qa | grep telnet 2. 安装 ...
- CentOS开启telnet连接
开启telnet连接通道 yum安装telnet yum -y install telnet-server* 关闭防火墙 /etc/init.d/iptables stop 编辑配置文件 vim /e ...
- 在centos5开启telnet服务并验证
1.安装telnet服务 [root@localhost ~]# yum install telnet 2.检查是否成功安装 [root@localhost ~]# rpm -qa | grep te ...
- centos 开启启动服务优化
默认开机启动服务列表:(此表转自 http://www.ha97.com/4815.html,另有多处补充) 服务名称 功能 默认 建议 备注说明 NetworkManager 用于自动连接网 ...
- 在云服务器 ECS Linux CentOS 7 下重启服务不再通过 service 操作,而是通过 systemctl 操作
在云服务器 ECS Linux CentOS 7 下重启服务不再通过 service 操作,而是通过 systemctl 操作. 操作说明如下: 1. 查看 sshd 服务是否启动: 看到上述信息就 ...
- linux怎么开启telnet服务
1>编辑telent的配置文件/etc/xinetd.d/telnet 如下: (设置disable = no,也就是开启telnet服务) service telnet { disable = ...
- 开发板怎样开启telnet服务
linux开发板开启telnet服务须要一下几个条件: 1.文件系统支持telnet busybox默认是把telnet和telnetd功能编进去了的,所以这一步一般都省了. 2.挂载devpts 挂 ...
- Windows开启telnet服务 + 连接失败处理
一.控制面板中安装Telnet相关组件 单击"开始"菜单,单击"控制面板" 在控制面板中单击打开"程序和功能"项目 在左侧的蓝色 ...
- CentOS 7 防火墙开启了哪些服务和端口?
过滤封包功能的 netfilter 已经内建在 CentOS 7 的内核,但是配置 netfilter 的界面程式 firewalld 却未必有安装,不论是否已经安装,都可以执行下面的安装指令: yu ...
随机推荐
- Use a microcontroller to design a boost converter
Boost converters, like other switchers, have traditionally received their control signals from a ded ...
- Digital variable resistor compensates voltage regulator
A variable resistor that integrates a programmable, temperature-indexed look-up table can compensate ...
- ELM323 - OBD (ISO) to RS232 Interpreter (v2.0)
http://elmelectronics.com/DSheets/ELM323DS.pdf
- ubuntu上安装systemtap
http://www.cnblogs.com/hdflzh/archive/2012/07/25/2608910.html
- SQL Server 的事务和锁 图解
http://www.cnblogs.com/lxconan/archive/2011/10/20/2218396.html
- Android Studio开发Android问题集【持续更新】
问题一:emulator:ERROR:This AVD's configuration is missing a kernel file!! 答:打开Android SDK Manager,查看相应的 ...
- 咏南MORMOT中间件免费开源
咏南MORMOT中间件免费开源 源码放QQ群(92449782)共享文件里面
- OpenShift 如何获取bearer Token以便进行各种API调用
Openshift 需要通过bearer token的方式和API进行调用,比如基于Postman就可以了解到,输入bearer token后 1.如何获取Bearer Token 但Bearer T ...
- Matlab中下标,斜体,及希腊字母的使用方法
下面是Matlab官方列出来的Tex代码列表,包含了绝大部分的希腊字母和数学符号. Character Sequence Symbol Character Sequence Symbol Charac ...
- error: <class 'xml.parsers.expat.ExpatError'>, syntax error: line 1, column 0: file: /usr/local/lib/python2.7/xmlrpclib.py line: 557
当linux设备上开启sonar6.2时, supervisorctl status报如下错误: error: <class 'xml.parsers.expat.ExpatError'> ...