Centos(5.8)开启telnet服务,当需要升级openssh的时候
来源:互联网 发布:mac系统装win8最新方法 编辑:程序博客网 时间:2024/06/06 08:45
CentOS5.8上安装telnet服务
当你需要升级openssh的时候,为了避免中途升级失败,导致远程不上,先将telnet开启。
1.查看系统版本及是否安装telnet
[root@centos32 comodo]# cat /etc/issue
CentOS release 5.8 (Final)
Kernel \r on an \m
[root@centos32 comodo]# rpm -qa|grep telnet
telnet-0.17-39.el5
其中CentOS系统默认已经安装了telnet,但是telnet-server软件包需要自行安装
2.安装telnet-server
1.可以下载rpm包安装(下载地址:http://rpmfind.net/linux/rpm2html/search.php?query=telnet-server)
2.可以#yum install telnet-server
安装完成后检查安装是否成功:
[root@centos32 comodo]# rpm -qa|grep telnet
telnet-0.17-39.el5
telnet-server-0.17-39.el5
3.启动telnet服务
方法1:图形桌面System->Administration->Services->"On Demand Services"菜单页选中telnet并保存
方法2:图形桌面Applications->Accessories->Terminal中输入#/usr/sbin/ntsysv回车选中telnet并保存
方法3:修改/etc/xinetd.d/telnet将disable = yes修改为no, 可以使用命令#sed -i 's/disable = yes/disable = no/' /etc/xinetd.d/telnet
方法4:修改启动项#/sbin/chkconfig telnet on
方法3和方法4需要重启telnet服务,运行命令#/etc/rc.d/init.d/xinetd restart
4.测试服务
[root@centos32 comodo]# 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.16.1.el5 on an i686
login: comodo
Password:
Last login: Thu Dec 6 15:19:27 from debian32
[comodo@centos32 ~]$ exit(此处可知telnet已经使用用户comodo成功登录)
logout
Connection closed by foreign host.
[root@centos32 comodo]#
5.允许root登录telnet(默认情况下,telnet禁止root用户登录)
方法1.修改/etc/pam.d/remote注释掉auth required pam_securetty.so
[root@centos32 comodo]# vim /etc/pam.d/remote
#%PAM-1.0
#auth required pam_securetty.so
方法2.先查看root登录使用的伪终端号,然后把这个伪终端加到/etc/securetty中
step 1:打开一个终端输入
[root@centos32 comodo]# 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.16.1.el5 on an i686
login: root
Password:
Login incorrect
login: Login timed out after 60 seconds
Connection closed by foreign host.
step 2:打开一个终端输入
[root@centos32 comodo]#tail /var/log/secure
Dec 6 15:51:15 centos32 login: pam_securetty(remote:auth): access denied: tty 'pts/7' is not secure !
Dec 6 15:51:18 centos32 login: FAILED LOGIN 1 FROM centos32 FOR root, Authentication failure
step 3:把pts/7加入到/etc/securetty后,telnet即可使用root账户登录
[root@centos32 comodo]# vim /etc/securetty
pts/7
当你需要升级openssh的时候,为了避免中途升级失败,导致远程不上,先将telnet开启。
当你需要升级openssh的时候,为了避免中途升级失败,导致远程不上,先将telnet开启。
1.查看系统版本及是否安装telnet
[root@centos32 comodo]# cat /etc/issue
CentOS release 5.8 (Final)
Kernel \r on an \m
[root@centos32 comodo]# rpm -qa|grep telnet
telnet-0.17-39.el5
其中CentOS系统默认已经安装了telnet,但是telnet-server软件包需要自行安装
2.安装telnet-server
1.可以下载rpm包安装(下载地址:http://rpmfind.net/linux/rpm2html/search.php?query=telnet-server)
2.可以#yum install telnet-server
安装完成后检查安装是否成功:
[root@centos32 comodo]# rpm -qa|grep telnet
telnet-0.17-39.el5
telnet-server-0.17-39.el5
3.启动telnet服务
方法1:图形桌面System->Administration->Services->"On Demand Services"菜单页选中telnet并保存
方法2:图形桌面Applications->Accessories->Terminal中输入#/usr/sbin/ntsysv回车选中telnet并保存
方法3:修改/etc/xinetd.d/telnet将disable = yes修改为no, 可以使用命令#sed -i 's/disable = yes/disable = no/' /etc/xinetd.d/telnet
方法4:修改启动项#/sbin/chkconfig telnet on
方法3和方法4需要重启telnet服务,运行命令#/etc/rc.d/init.d/xinetd restart
4.测试服务
[root@centos32 comodo]# 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.16.1.el5 on an i686
login: comodo
Password:
Last login: Thu Dec 6 15:19:27 from debian32
[comodo@centos32 ~]$ exit(此处可知telnet已经使用用户comodo成功登录)
logout
Connection closed by foreign host.
[root@centos32 comodo]#
5.允许root登录telnet(默认情况下,telnet禁止root用户登录)
方法1.修改/etc/pam.d/remote注释掉auth required pam_securetty.so
[root@centos32 comodo]# vim /etc/pam.d/remote
#%PAM-1.0
#auth required pam_securetty.so
方法2.先查看root登录使用的伪终端号,然后把这个伪终端加到/etc/securetty中
step 1:打开一个终端输入
[root@centos32 comodo]# 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.16.1.el5 on an i686
login: root
Password:
Login incorrect
login: Login timed out after 60 seconds
Connection closed by foreign host.
step 2:打开一个终端输入
[root@centos32 comodo]#tail /var/log/secure
Dec 6 15:51:15 centos32 login: pam_securetty(remote:auth): access denied: tty 'pts/7' is not secure !
Dec 6 15:51:18 centos32 login: FAILED LOGIN 1 FROM centos32 FOR root, Authentication failure
step 3:把pts/7加入到/etc/securetty后,telnet即可使用root账户登录
[root@centos32 comodo]# vim /etc/securetty
pts/7
当你需要升级openssh的时候,为了避免中途升级失败,导致远程不上,先将telnet开启。
0 0
- Centos(5.8)开启telnet服务,当需要升级openssh的时候
- CentOS开启telnet服务
- CentOS开启telnet服务
- centos开启telnet服务
- telnet 服务的开启
- CentOS 5.3 Linux系统开启telnet服务
- Centos开启telnet/ssh/ftp/sftp服务
- 开启linux的telnet服务
- 开启ubuntu的telnet服务
- Readhat telnet 服务的开启
- centos升级openssh的两种方式
- centos升级openssh的两种方式
- CentOS 6.5 升级 openssh
- centos升级openssh
- Ubuntu开启SSH服务(相应的openssh安装)& FTP服务(相应的vsftpd安装)
- 快速开启对方机器(win2000)的telnet服务
- CentOS openssh升级到openssh-7.2版本
- CentOS openssh升级到openssh可用
- CF345div2B
- [leetcode] 329. Longest Increasing Path in a Matrix
- 将一个正整数分解质因数
- 【C语言】实现对一个8bit数据(unsigned char)类型的指定位的置0或置1操作,并保持其他位不变
- HDU 1005 循环节(找规律题目)
- Centos(5.8)开启telnet服务,当需要升级openssh的时候
- Tomcat负载均衡和集群环境的搭建
- 猴子吃桃问题
- 【无人机开发】通讯协议MavLink详解
- #!/usr/bin/php
- ArrayAdapter ,SimpleAdapter与SimpleCursorAdapter 区别
- 7. SpringMVC 数据验证
- 使用git管理自己的代码--简单使用流程
- 从尾到头打印链表