Ubuntu telnet

摘要:
首先,在Ubuntu中安装xinetd(它是inetd的替代品):sudoapt getinstallxinetd,然后安装telnet。Ubuntu中没有telnet包。它包含在inetutils telnet包中:sudoapt getinstallinetutils Telnet在/etc/xinetd中创建一个新文件。d目录,名称为telnet,内容为:#default:off#

首先在Ubuntu中安装xinetd(它是inetd替代品):

sudo apt-get install xinetd

再安装telnetd,在Ubuntu中没有telnetd这个软件包,它是包含在inetutils-telnetd软件包中:

sudo apt-get install inetutils-telnetd

在/etc/xinetd.d目录下新建文件,名称为telnet,内容为:

# default: off
# description: Telnet service which is the interface of remote access.
# This is the tcp version.I omited the UDP's.

service telnet
(
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/telnetd
disable = no
}

重新启动xinetd:

sudo /etc/init.d/xinetd restart

在终端查看telnet服务有没有打开:

netstat -ta | grep telnet

输出可能如下:

tcp 0 0 *:telnet *:* LISTEN

说明telnet已启动.

现在先在本地测试一下

再在Windows平台下测试一下

若只允许在局域网内的机器访问,则可在/etc/hosts.allow文件中添加所在局域网的IP段地址或网络组:

# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5) and hosts_options(5).
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
# If you're going to protect the portmapper use the name "portmap" for the
# daemon name. Remember that you can only use the keyword "ALL" and IP
# addresses (NOT host or domain names) for the portmapper, as well as for
# rpc.mountd (the NFS mount daemon). See portmap(8) and rpc.mountd(8)
# for further information.

免责声明:文章转载自《Ubuntu telnet》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇一个非常好的滑动门代码Java命令行工具总结下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

嵌入式 busybox自带的tftp、telnet、ftp服务器

a、tftp server服务器配置与使用 方法1: #udpsvd -vE 069 tftpd -c /root& //上面的0表示对所有ip地址都进行侦听 方法2: #vi/etc/inetd.conf 69 dgram udp nowait root tftpd tftpd -c /root #inetd 测试使用: 我们可以通过window...

telnet批量测试端口脚本

作者都已经备注的很详细了,不在赘述。 telnet.sh #!/bin/bash #功能,批量telnet端口,输入参数需要测试的IP:PORT列表文件:telnet_list.txt(文件名可以自定义,但是只能跟脚本放在同一目录) #使用方法: telnet.sh telnet_list.txt ;或者后台执行: sh telnet.sh telnet_...

DNS(BIND)服务搭建

一、DNS 1.负责将域名解析为IP(正向解析);将IP解析为域名(反向解析) 2.DNS查询过程 如客户端访问www.baidu.com 1)客户端查看本地是否存有DNS缓存 2)客户端查看本地hosts文件是否有域名对应IP地址 3)客户端向首选DNS服务器请求指定域名的IP地址,如果首选DNS本地缓存指定域名 4)首选DNS服务器向根(.)发送查询请...

Ansible playbooks

Playbook是Ansible的配置,部署和编排语言。 他们可以描述您希望远程系统执行的策略,或一般IT流程中的一组步骤。 如果Ansible modules是您workshop的工具,则playbooks是您的说明手册,您的主机inventory是您的原材料。 在基本层面上,可以使用playbooks来管理远程机器的配置和部署。 在更高级别,他们可以对...

Linux安全加固手册

1 身份鉴别 1.1 密码安全策略 操作系统和数据库系统管理用户身份鉴别信息应具有不易被冒用的特点,口令应有复杂度要求并定期更换。 设置有效的密码策略,防止攻击者破解出密码 1)查看空口令帐号并为弱/空口令帐号设置强密码 # awk -F: '($2 == ""){print $1}' /etc/shadow 可用离线破解、暴力字典破解或者密码网站查询出...

在CMD上用telnet远程登录发送邮件测试记录

几天复习下计算机网络的东西,顺便试试用telnet登录发送邮件。 首先,输入:telnet smtp.163.com 25 (这个视乎你用什么服务而定,看邮件我试过pop3服务器可行,不过现在邮件包含东西太多,每封邮件都弹出一大堆数据) 服务器返回: 220 gz-t-163smtp2.163.com SMTP Server for Netease [46...