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 ...
随机推荐
- 自定义的tabBarController的几种方法
本文转载自:http://blog.sina.com.cn/s/blog_79c5bdc30100t88i.html 我自己实现的一种可以很方便的实现更换TabBarController图片的方法,代 ...
- 按字母顺序排列的IDC函数列表
http://www.2cto.com/shouce/ida/162.htm 按字母顺序排列的IDC函数列表 下面是函数描述信息中的约定: 'ea' 线性地址 'success' 0表示函数失败:反之 ...
- [ring3反作弊篇] 基于EBP遍历调用栈及模块名
http://blog.csdn.net/wangningyu/article/details/44569803
- 读CRecordset
void CDictCol::LoadDictCol(void) { // 加载数据字典信息 CString cstrSql; cstrSql.Format("SELECT dc.TblID ...
- easyui 设置一加载,搜索框立即弹出的效果
1.部分html文件 <div id="searchForm" region="north" title="标的查询" collaps ...
- HTML:几个常见的列表标签
介绍: 在网页中列表是很常见的标签,主要分为有序标签.无序标签.列表嵌套.定义标签 有序标签:<ol><li></li><ol> 无序标签:<ul ...
- iOS: xcode打包上传iTunes失败,iTunes Store operation failed,this action can not complete .try again
通过xcode点击“upload to app store”上传到itunes,结果一直提示“itunes store operation failed” 原因:网速的问题,我之前也遇到过,网速好的时 ...
- OpenMP 线程同步之临界区
多核/多线程编程中肯定会用到同步互斥操作.除了互斥变量以为,就是临界区. 临界区是指在用一时刻只允许一个线程执行的一段用{...},包围的代码段. 在OpenMP中临界区声明方法如下: #pragma ...
- 运算符重载,浅拷贝(logical copy) ,vs, 深拷贝(physical copy),三大件(bigthree problem)
一般的我们喜欢这样对对象赋值: Person p1;Person p2=p1; classT object(another_object), or A a(b); classT object = ...
- java垃圾回收机制--可达性算法
先说一些题外话,Java虚拟机在执行Java程序的过程中会把它所管理的内存划分为若干个不同的数据区,这些区分为线程私有区和线程共享区 1.线程私有区 a.程序计数器 记录正在执行的虚拟机字节码指令地址 ...