How to set up telnet in AWS instance?

霸气de小男生 提交于 2020-02-26 08:28:26

问题


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


回答1:


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

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

  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.

  2. 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 }

    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 }

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

  3. Bring up the telnet service:

    Bring up the telnet daemon as root using sudo service xinetd restart command

  4. 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>

  5. 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:

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

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




回答2:


sudo yum -y install telnet

This works for me after logging in to the EC2 instance



来源:https://stackoverflow.com/questions/44085886/how-to-set-up-telnet-in-aws-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!