linux telnet远程登录工具,Linux 远程登录(telnet ssh)
Linux 远程登录(telnet ssh)
telnet
[root@rhel6 ~]# rpm -qa | grep telnet
telnet-server-0.17-47.el6.x86_64
telnet-0.17-47.el6.x86_64
[root@rhel6 ~]# vi /etc/xinetd.d/telnet //telnet是依赖于xinetd的
# 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
instances = 1 //设置服务器最大连接数(即只允许1个用户通过telnet登录)
# bind = 192.168.0.90 //只允许经由该适配器的数据包进来
# only_from = 192.168.0.0/24 //只允许该网段通过telnet访问
# no_access = 192.168.0.100 //不允许该IP通过telnet访问
# access_times = 9:00-18:00 //telnet服务开放的时间
}
[root@rhel6 ~]# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@rhel5 ~]# telnet rhel6
Trying 192.168.0.90...
Connected to rhel6.
Escape character is '^]'.
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Kernel 2.6.32-220.el6.x86_64 on an x86_64
login: root
Password:
Login incorrect //默认禁止root用户通过telnet登录
login: xfcy
Password:
Last login: Wed Dec 26 17:17:08 from rhel6
[xfcy@rhel6 ~]$ who
root pts/0 2012-12-27 12:01 (192.168.0.90)
xfcy pts/1 2012-12-27 12:18 (rhel5)
[xfcy@rhel6 ~]$ telnet rhel6
Trying 192.168.0.90...
Connected to rhel6.
Escape character is '^]'.
Connection closed by foreign host. //不允许第2个用户通过telnet登录
[root@rhel6 ~]# netstat -lntp | grep :23 //默认监听23号端口
tcp 0 0 :::23 :::* LISTEN 5169/xinetd
[xfcy@rhel6 ~]$ vi /etc/services //修改telnet服务的监听端口为230
telnet 230/tcp
telnet 230/udp
[root@rhel6 ~]# /etc/init.d/xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@rhel6 ~]# netstat -lntp | grep :23
tcp 0 0 :::230 :::* LISTEN 5319/xinetd
[root@rhel5 ~]# telnet rhel6
Trying 192.168.0.90... //默认通过23号端口无法访问telnet服务
telnet: connect to address 192.168.0.90: Connection refused
telnet: Unable to connect to remote host: Connection refused
[root@rhel5 ~]# telnet rhel6 230 //通过230端口可成功访问telnet服务
Trying 192.168.0.90...
Connected to rhel6.xfcy.org (192.168.0.90).
Escape character is '^]'.
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Kernel 2.6.32-220.el6.x86_64 on an x86_64
login: xfcy
Password:
Last login: Thu Dec 27 12:50:16 from rhel5
[xfcy@rhel6 ~]$ netstat -an | grep :23
tcp 0 0 192.168.0.90:230 192.168.0.89:51147 ESTABLISHED
tcp 0 0 :::230 :::* LISTEN
情况下,linux不允许root用户以telnet方式登录linux主机,若要允许root用户登录,可采取以下3种方法之一:
1.修改login文件
RedHat中对于远程登录的限制体现在/etc/pam.d/login 文件中,如果把限制的内容注销掉,那么限制将不起作用。
[root@rhel5 ~]# vi /etc/pam.d/login
#%PAM-1.0 auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth include system-auth
#account required pam_nologin.so
account include system-auth
password include system-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session include system-auth
session required pam_loginuid.so
session optional pam_console.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
2.移除securetty文件
验证规则设置在/etc/securetty 文件中,该文件定义root用户只能在tty1-tty11的终端上记录,移除该文件即可避开验证规则实现root用户远程登录。
[root@rhel5 ~]# mv /etc/securetty /etc/securetty.bak
3.修改securetty文件
[root@rhel5 ~]# vi /etc/securetty
console
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
pts/7
pts/8
pts/9
pts/10
pts/11
linux telnet远程登录工具,Linux 远程登录(telnet ssh)相关推荐
- 使用MySQL Workbench远程管理工具进行远程管理Mysql的错误及解决办法
概述: 最近要使用MySQL Workbench远程管理工具进行远程管理虚拟机上的MySQL.可是,在配置的过程中,遇到了一些问题,下面是这个问题(HOSt ip is not allowed to ...
- 使用Windows远程桌面工具来远程连接控制Ubuntu系统
转载来源 :使用Windows远程桌面工具来远程连接控制Ubuntu系统 :http://www.safebase.cn/article-258275-1.html 介绍 有时需要在实际的电脑上安装U ...
- linux 系统后门检测工具,Linux系统的各种后门和日志工具详细介绍[2]
chfn 提升本地普通用户权限的程序 运行chfn 在它提示输入新的用户名时 如果用户输入rookit密码 他的权限就被提升为root chsh 提升本地用户权限的程序 运行chsh 在它提示输入新的 ...
- linux批量部署war工具,Linux 批量一键部署工具 Expect
Linux 批量一键部署工具 Expect 既然没有遇到过,做好准备总是好的.这是自己送给自己的话,现在运维做自动话越来越多,自己就学以下,记录笔记.目前主流的有puppet.Expect.pssh等 ...
- linux bes二进制查看工具,Linux的命令及工具
1.查看系统运行的进程 # ps auxw 2.netstat命令 查看系统监听的服务 # netstat -ln -a所有的有效连接信息列表,包括已建立的连接(ESTABLISHED),也包括监听连 ...
- linux批量部署war工具,Linux批量部署工具Expect
既然没有遇到过,做好准备总是好的.这是自己送给自己的话,现在运维做自动话越来越多,自己就学以下,记录笔记.目前主流的有puppet.Expect.pssh等等,今天就用Expect做自动部署和日常管理 ...
- linux 系统arp检测工具,linux网络常用诊断工具
ping命令是检测网络通讯链路状况工具之一,主要用于查看网络上另一个主机系统的网络连接是否正常. 参数: -c 设置完成要求回应的次数. -f 极限检测. -i 指定收发信息的间隔时间. ...
- linux 的一些实用工具,linux 命令行下的一些实用工具
linux 命令行下的一些实用工具 命令行下的一些常用应用: awesome 适合geek的桌面管理器VM mc ...
- linux配置文件密码加密工具,Linux下利用openssl对文件进行加密和解密
转载地址:http://hi.baidu.com/edeed/item/99206a096b62d0e1ff240db8 --建立文件test.txt, 特意写入中英文# cd /tmp # echo ...
- linux 串口转网口工具,linux下串口调试工具/串口终端推荐: picocom(转)
Servlet 3.0 异步模式 Servlet 3.0标准新增了异步处理的支持. 进行异步处理的Servlet和作用于该Servlet的拦截器都必须声明对于异步处理的支持. java 资源监控 ht ...
最新文章
- Redis实现消息队列
- mac 上安装服务,查看服务,重启和关闭
- OpenCV AKAZE本地特征匹配
- Mysql常用的命令
- 数据结构与算法之Manacher算法
- 216. 组合总和 III017(回溯法求解)
- 碰撞检测技术:kd tree
- 把你的项目升级到IE8
- 面试官十大常问面试问题总结
- 元胞机模拟量子计算机,我国量子计算和量子模拟研究取得新突破
- python官网中文官网-Python官方中文文档强势来袭
- JAVA中构造方法说法_关于Java程序的构造方法,说法错误的是( )
- 第三方支付业务流程介绍
- UML工具大全(上)
- “脑科学”已成大国“必争之地” 看各国都亮哪些大招 | 2030年中国脑计划将闯入“终极疆域” 脑科学将成为大国必争之地
- 2020寒假【gmoj2008】【Oliver的成绩】【高精度】
- unity物体自身轴旋转_unity3d如何实现物体自动旋转-unity3d物体自动旋转的设置教程 - 河东软件园...
- excel单元格显示公式_Excel公式显示在单元格中
- android执行lua脚本的方法,android执行lua脚本的方法
- CSU 1224 ACM小组的古怪象棋
热门文章
- 有关开发的配置的有用信息
- C中堆管理—浅谈malloc,free,calloc,realloc函数之间的区别
- 中使用mysql连接失败_如何在命令行下使用 MySQL 连接数据库不用每次都输入密码?...
- hive中的绣花模型_hive建模方法
- 在r中对oracle,关于r:在Mac中安装ROracle
- php常用案例,PHP常用数组处理函数总结,附带运行案例
- mysql 必须安装php_非root模式下安装mysql php小记
- 通用试题库管理系统 jsp mysql_通用在线考试系统 JSP+Servlet+MySQL
- 36岁的it一线运维是不是废了_IT外包人员职业人生的漂泊,何为归处?
- mysql having子句_mysql having子句学习