系统默认安装了telnet(client),所以只能用telnet登录别人开启telnet服务的主机,其他人是不能telnet登录本机的。

现在想要的是让别人可以使用telnet登录本机,需要安装两个软件:

xintd,telnetd

其中telnetd是telnet-server,但它是无法自我启动的,需要管理daemon软件xinetd来接管。

1. 安装xinetd和telnetd

$sodu apt-get install xinetd telnetd

2. 配置文件

A. /etc/inetd.conf

$ cat /etc/inetd.conf (如果存在就不需要了)

显示telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

B. 修改/etc/xinetd.conf

$ sudo gedit /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/ defaults
{ # Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info(插入红色部分)
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
} includedir /etc/xinetd.d C. 修改/etc/xinetd.d/telnet $ sudo gedit /etc/xinetd.d/telnet 并加入以下内容: # 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 #in.telnetd是telnetd安装文件
log_on_failure += USERID
} 3. 重启机器或重启网络服务

$ sudo /etc/init.d/xinetd restart

4. 使用TELNET客户端远程登录;ifconfig -a显示本机地址;
可以确定telnet服务器已经搭建完成,这时只需要换个电脑,然后使用telnet ip即可登录。
默认的设定是root不能通过telnet登录(telnet在网络上是明文传输,可以被sniffer侦测出密码),如果安全性有保证,可以通过一下方法允许root登录

(1)修改/etc/securetty文件,添加终端
    root@kristain_desktop:~# tail -5 /etc/securetty 
    pts/0
    pts/1
    pts/2
    pts/3
    pts/4 或者直接将securetty文件改名,即可使用root登录

(2)修改/etc/pam.d/login文件,将securetty验证注释调        
# Disallows root logins except on tty's listed in /etc/securetty     
# (Replaces the `CONSOLE' setting from login.defs)
# Note that it is included as a "required" module. root will be
# prompted for a password on insecure ttys.
# If you change it to a "requisite" module, make sure this does not leak
# user name information.
#auth       required  pam_securetty.so
这样telnet基本上就配置完成了,不过还是建议大家用ssh . 转自:http://www.cnblogs.com/kristain/articles/2590238.html

ubuntu下telnet安装的更多相关文章

  1. Torch7在Ubuntu下的安装与配置

    Torch7的本系列教程的主要目的是介绍Torch的入门使用.今天首先分享一下Torch7的安装.(在Ubuntu14.04安装torch7) 为什么选择Torch Torch的目标是在建立科学算法的 ...

  2. ubuntu下git安装及使用

    ubuntu下git安装及使用   其实,好几个月前,就已经安装好了,可是一直搁置在那儿,所以密码等一些其它细节都忘的差不多了,所以今天就重新部署了一下,并开始积极使用......... 1,git ...

  3. premake Ubuntu下的安装

    premake是个跨平台的编译工具,先看看在Ubuntu下怎么安装. 首先下载,在/usr目录下: sudo wget -O premake-4.4-beta4-linux.tar.gz http:/ ...

  4. linux,windows,ubuntu下git安装与使用

    ubuntu下git安装与使用:首先应该检查本地是否已经安装了git ,如果没有安装的话,在命令模式下输入 sudo apt-get install git 进行安装 输入git命令查看安装状态及常用 ...

  5. ubuntu下如何安装codeblocks集成开发环境

    codeblocks是一个十分优秀的C/C++开发IDE,虽然后起之秀codelite目前来看大有超越之势哦. 不过在ubuntu下安装codeblocks却比较麻烦,不像其他linux发行版,比如s ...

  6. ubuntu下makeinfo安装,其实真正安装的是texinfo包

    操作系统环境:ubuntu 在终端中执行命令:sudo apt-get install texinfo   今天在打包的时候有个包需要 makeinfo,当时就各种搜结果就没有 makeinfo 这个 ...

  7. Ubuntu下软件安装方式、PATH配置、查找安装位置

    Ubuntu 18.04, 安装方式 目前孤知道的Ubuntu下安装软件方式有3种(命令): 1.make 2.apt/apt-get 3.dpkg 方式1基于软件源码安装,需要经历配置(可选).编译 ...

  8. ubuntu 下python安装及hello world

    //@desn:ubuntu 下python安装及hello world //@desn:码字不宜,转载请注明出处 //@author:张慧源  <turing_zhy@163.com> ...

  9. ubuntu下mysql安装(server、client、dev),开启、停止和重启,及常见错误

    转自:ubuntu下mysql安装(server.client.dev),开启.停止和重启,及常见错误 1. 在ubuntu下安装server和client很简单: (1)安装server apt-g ...

随机推荐

  1. Douglas Peucker算法的C#实现

    一.算法原理 Douglas-Peucker算法 在数字化过程中,需要对曲线进行采样简化,即在曲线上取有限个点,将其变为折线,并且能够在一定程度 上保持原有的形状. 经典的Douglas-Peucke ...

  2. webpack导入es6的简单应用

    1.先全局安装babel的需要文件 npm install -g babel-cli npm install --save-dev babel-preset-es2015 babel-core bab ...

  3. SQL Server在存储过程中编写事务处理代码的三种方法

    SQL Server中数据库事务处理是相当有用的,鉴于很多SQL初学者编写的事务处理代码存往往存在漏洞,本文我们介绍了三种不同的方法,举例说明了如何在存储过程事务处理中编写正确的代码.希望能够对您有所 ...

  4. [Linux]nginx tomcat做负载均衡

    之前使用nginx做过web反向代理,没有做过负载均衡,今天有个同学须要做tomcat的负载均衡,我也研究下. 一共是2个机器,一个物理机(win7)上面部署2个tomcat,使用不同的port启动. ...

  5. x-forwarded-for之深度挖掘

    如今利用nginx做负载均衡的实例已经很多了,针对不同的应用场合,还有很多需要注意的地方,本文要说的就是在通过CDN 后到达nginx做负载均衡时请求头中的X-Forwarded-For项到底发生了什 ...

  6. Unity GPU Query OpenGLES 3.0

    https://github.com/google/render-timing-for-unity/blob/master/RenderTimingPlugin/RenderTimingPlugin. ...

  7. webpack配置:打包第三方类库、第三方类库抽离、watch自动打包、集中拷贝静态资源

    一.打包第三方类库 下面说2种方法: 第一种: 1.引入jQuery,首先安装: npm install --save-dev jquery 2.安装好后,在index.js中引入,用jquery语法 ...

  8. 病毒木马查杀实战第022篇:txt病毒研究

    前言 反病毒爱好者们非常喜欢讨论的一个问题就是,现在什么样的病毒才算得上是主流,或者说什么样的病毒才是厉害的病毒呢?我们之前的课程所解说的都是Ring3层的病毒.所以有些朋友可能会觉得.那么Ring0 ...

  9. Linux——配置使用github

    前一段时间在windows下配置了github的环境,参考“TortoiseGit连接github.com”一文,现在学习在linux下编程,在网上找了点资料,配置在linux下使用github,将过 ...

  10. ant design pro 表单

    1.Input Enter事件 <input onKeyUp={this.onKeyUp} onPressEnter={this.enter} /> onKeyUp = (e) => ...