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 ...
随机推荐
- iOS 反反注入 修改__RESTRICT,__restrict工具
通过在 Xcode 里的 Other Linker Flags 设置参数,可以防止App被注入dylib(仅限于iOS 10 以下系统) 比如,某艺,XX音乐等 dylib无法注入,也就意味着没办法 ...
- unix-软件安装
检查软件是否已经安装 rpm -qa|grep 软件标识名 在线安装软件 yum -y install 软件标识名
- CentOS 6.9/7通过yum安装指定版本的PostgreSQL扩展PostGIS
一.安装PostGIS扩展插件(24_10) // 安装EPEL源 # rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-rele ...
- 一个简单RPC框架是怎样炼成的(V)——引入传输层
开局篇我们说了,RPC框架的四个核心内容 RPC数据的传输. RPC消息 协议 RPC服务注冊 RPC消息处理 接下来处理传输数据.实际应用场景一般都是基于socket.socket代码比較多, ...
- MOSFET enhances voltage regulator's overcurrent protection
The classic LM317 adjustable-output linear voltage regulator offers a relatively high, if package-de ...
- Delphi插件创建、调试与使用应用程序扩展
Delphi插件创建.调试与使用应用程序扩展 翻译 : MiracleZ 有没有使用过Adobe Photoshop?如果用过,你就会对插件的概念比较熟悉.对外行人来说,插件仅仅是从外部提供给应用程 ...
- ELM327 蓝牙/WIFI/USB diagnostic interface
- source insight完全卸载
由于不知名原因 source insight崩溃了,使用自带的卸载,完成之后重新安装软件注册还是出问题.在网上搜索资料发现就是删除注册表中的内容. 由于列出的删除项目不完全,导致还是出问题. 最后删除 ...
- Model工具
Sybase PowerDesigner - 一个高端数据建模工具.你可以下载一个45天试用版. ERWin - 一个高端数据建模工具.可下载试用版. Rational Rose Enterprise ...
- python笔记22-literal_eval函数处理返回json中的单双引号
前言 在做接口测试的时候,最常见的接口返回数据就是json类型,json类型数据实际上就是字串,通常标准的json格式是可以转化成python里面的对应的数据类型的 有时候开发返回的数据比较坑,不按常 ...