Linux开启telnet(root也可以登录)
原创rhel_jxd ©著作权
文章标签 Linux开启telnet(root也可 文章分类 运维
©著作权归作者所有:来自51CTO博客作者rhel_jxd的原创作品,请联系作者获取转载授权,否则将追究法律责任
service xinted status
没有安装
rpm -ivh 按照顺序安装以下三个包
xinetd-2.3.14-34.el6.x86_64.rpm
telnet-server-0.17-47.el6.x86_64.rpm
telnet-0.17-47.el6.x86_64.rpm
开启服务
service xinetd start
解除禁用
[root@RHEL6 /etc/xinetd.d]$cat /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}
查看进程
[jxd@RHEL6 /home/jxd]$ps -ef |grep xinetd |grep -v grep
root 5443 1 0 23:35 ? 00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
此时已经可以用普通用户telnet
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel 2.6.32-279.el6.x86_64 on an x86_64
login: jxd
Password:
Last login: Thu Mar 14 23:36:44 from 192.168.0.2
#vi /etc/motd (Message of today)
Welcome to Linux RHEL6.2 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Installed on 2013-03-14
For Linux test server
By jxd
If any question please mail to jiangxundong@qq.com
默认不允许root通过telnet登录的,下面是修改方法
vi /etc/pam.d/login
auth require pam_securetty.so
修改为
#auth require pam_securetty.so
或mv /etc/securetty /etc/securetty.bak
重启服务
[root@RHEL6 /root]$service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@RHEL6 /root]$service xinetd status
xinetd (pid 6157) is running...
测试
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel 2.6.32-279.el6.x86_64 on an x86_64
login: root
Password:
Last login: Fri Mar 15 00:04:17 from 192.168.0.2
#vi /etc/motd (Message of today)
Welcome to Linux RHEL6.2 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Installed on 2013-03-14
For Linux test server
看服务
[root@RHEL6 /root]$chkconfig --list |grep xinetd
xinetd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
此类连接方式为明文传输,故一般生产用ssh
ssh允许root登录;拒绝就填no
[root@RHEL6 /root]$grep PermitRootLogin /etc/ssh/sshd_config
#PermitRootLogin yes
关闭
[root@RHEL6 /root]$chkconfig xinetd off
[root@RHEL6 /root]$chkconfig --list |grep xinetd
xinetd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
购物车的实现(未登录时也可以使用)
平时工作的踩坑记录
redis List 拦截器 -
Root用户以telnet方式登录Linux系统
默认情况下,root用户不能以telnet方式连接linux操作系统,而且也是不安全的。但从技术上来讲,是可以实现的,有两种方法:
linux root用户 linux操作系统 linux系统