如何在AWS实例中设置telnet? [英] How to set up telnet in AWS instance?

查看:489
本文介绍了如何在AWS实例中设置telnet?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的SSH工作正常.但是我在通过telnet连接时遇到了问题.

I got SSH working fine. But I am facing an issue with connecting via telnet.

推荐答案

ssh ,因为 telnet 未加密且默认情况下未安装在Amazon实例中.

ssh is recommended over telnet, as telnet is not encrypted and is by default not installed in amazon instance.

但是,如果需要,Linux涉及的步骤:Amazon Instance或Centos

However if needed, steps involved for Linux : Amazon Instance or Centos

  1. 在实例中安装telnet守护程序:使用sudo yum install telnet-server安装telnet-server.软件包telnet用于客户机程序,以防万一需要使用实例中的telnet客户机进行连接,而练习不需要.

  1. Install telnet daemon in the instance: Install telnet-server using sudo yum install telnet-server . Package telnet is for the client program in case one want to connect using telnet client from the instance, not needed for the exercise.

启用telnet守护程序服务: -默认情况下,该服务在/etc/xinetd.d/telnet中处于禁用状态,disable标志需要设置为no.

Enable the telnet daemon service: - By default the service is disabled in /etc/xinetd.d/telnet, The disable flag needs to be set to no.

service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID disable = yes }

service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID disable = yes }

发布更改后,其外观应如下所示 service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID disable = no }

Post change it should look like below service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID disable = no }

如有任何与编辑相关的错误,请验证配置. sudo chkconfig xinetd on

Verify the configuration in case of any edit related errors. sudo chkconfig xinetd on

启动telnet服务:

使用sudo service xinetd restart命令

在AWS Console上启用入站telnet默认端口(23): 在AWS Console EC2/Security Groups/<Your Security Group>/Inbound中,设置规则

Enable inbound telnet default port (23) on AWS Console: In AWS Console EC2/Security Groups/<Your Security Group>/Inbound, set a rule

Type:Custom-TCP Rule

Protocol: TCP Range

Port Range: 23

Source: <As per your business requirement>

测试telnet连接: 从防火墙中启用的任何客户端测试telnet连接.

Test the telnet connection: Test the telnet connection from any client enabled in the firewall.

>telnet ec2-XX-XX-XXX-XXX.region.compute.amazonaws.com. Connected to ec2-XX-XX-XXX-XXX.region.compute.amazonaws.com. Escape character is '^]'. Password:

>telnet ec2-XX-XX-XXX-XXX.region.compute.amazonaws.com. Connected to ec2-XX-XX-XXX-XXX.region.compute.amazonaws.com. Escape character is '^]'. Password:

对于其他Linux变体,步骤(工具)将略有不同.

The steps(tools) will vary slightly for other linux variants.

PS:参考 http ://aws-certification.blogspot.in/2016/01/install-and-setup-telnet-on-ec2-amazon.html ,修复了命令中的一些问题.

PS: Referred http://aws-certification.blogspot.in/2016/01/install-and-setup-telnet-on-ec2-amazon.html, fixed few issues in the commands.

这篇关于如何在AWS实例中设置telnet?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆