Сервер telnet для linux

Сервер telnet для linux

Error message

  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context has a deprecated constructor in require_once() (line 127 of /home/asifkhan/linuxpathfinder.com/sites/all/modules/ctools/ctools.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context_required has a deprecated constructor in require_once() (line 127 of /home/asifkhan/linuxpathfinder.com/sites/all/modules/ctools/ctools.module).
  • Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; ctools_context_optional has a deprecated constructor in require_once() (line 127 of /home/asifkhan/linuxpathfinder.com/sites/all/modules/ctools/ctools.module).

Linux Pathfinder: Linux Howtos and Tutorials

Install and configure Telnet Server in Linux

Install and configure Telnet Server in Linux

Install and configure Telnet Server in Linux

Telnet service is to provide a text-oriented communications and this service is used on internet/LAN using a virtual terminal connection. Telnet by default uses 23 port number. We will use telnet server installation and configurations on CentOS 6 / Red Hat family as this service is also applicable and works to fedora distribution environment.

IP Configuration ( My Server IP address is 172.16.41.82 )

Telnet Server Configuration

Open Terminal and login as root user.

Install Telnet server using yum.

[root@linuxpathfinder /]# yum install telnet telnet-server Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package telnet.i686 1:0.17-47.el6_3.1 will be installed ---> Package telnet-server.i686 1:0.17-47.el6_3.1 will be installed --> Processing Dependency: xinetd for package: 1:telnet-server-0.17-47.el6_3.1.i686 --> Running transaction check ---> Package xinetd.i686 2:2.3.14-39.el6_4 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================== Package Arch Version Repository Size ================================================================= Installing: telnet i686 1:0.17-47.el6_3.1 base 57 k telnet-server i686 1:0.17-47.el6_3.1 base 36 k Installing for dependencies: xinetd i686 2:2.3.14-39.el6_4 updates 122 k Transaction Summary ================================================================= Install 3 Package(s) Total download size: 215 k Installed size: 413 k Is this ok [y/N]: Press [y] to complete the installation. Installed: telnet.i686 1:0.17-47.el6_3.1 telnet-server.i686 1:0.17-47.el6_3.1 Dependency Installed: xinetd.i686 2:2.3.14-39.el6_4 Complete!

Need to configure telnet server, go to the directory /etc/xinetd.d to change configuration.

[root@linuxpathfinder /]# cd /etc/xinetd.d

Using vim editor to edit the telnet file.

[root@linuxpathfinder xinetd.d]# ls chargen-dgram daytime-dgram discard-dgram echo-dgram tcpmux-server time-dgram chargen-stream daytime-stream discard-stream echo-stream telnet time-stream

Change option ‘disable = yes’ to ‘disable = no’.

# 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 >

Restart the service after change in the file and permanently save the changes by using chkconfig option.

[root@linuxpathfinder xinetd.d]# service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ] [root@linuxpathfinder xinetd.d]# chkconfig xinetd on

Check out the firewall settings for further configuration:

Читайте также:  Не обновляется альт линукс

telnet-server-01

Enable the firewall settings and add telnet port 23 and Protocol is tcp

Again restart the xinetd service after firewall settings.

[root@linuxpathfinder /]# service xinetd restart

Telnet Client Configuration

On the client end, you have to know the IP address of the remote server to access via telnet remotely. Remote communication with Telnet is insecure between server and client. For the secure communication use ssh service as explained already in previous tutorials.

Open Terminal and use the command telnet

Now put the username and password to access the remote system. (Login name : asifark)

Note : You cannot directly login as a super user in telnet.

[root@linux-server ~]# telnet 172.16.41.82 Trying 172.16.41.82. Connected to 172.16.41.82. Escape character is '^]'. CentOS release 6.4 (Final) Kernel 2.6.32-358.18.1.el6.i686 on an i686 login: asifark Password: Last login: Wed Sep 30 14:44:14 from 172.16.41.82 [asifark@linuxpathfinder ~]$ ls history_file.txt [asifark@linuxpathfinder ~]$ logout Connection closed by foreign host. [root@linux-server ~]#

Источник

Как установить и использовать Telnet в Ubuntu 22.04 LTS

Telnet — это программа эмуляции терминала для сетей TCP/IP, которая позволяет вам получить доступ к другому компьютеру в Интернете или в локальной сети, войдя в удаленную систему. Telnet — это клиент-серверный протокол, который подключается к порту 23 протокола управления передачей. Вы также можете использовать Telnet для проверки открытых портов в удаленной системе.

В этом руководстве вы узнаете, как установить и использовать сервер и клиент Telnet на сервере Ubuntu 22.04 LTS.

ПРЕДУПРЕЖДЕНИЕ. Telnet — незашифрованный и поэтому небезопасный протокол. Это руководство предназначено только для образовательных целей и не является рекомендацией по использованию Telnet Server в вашей системе. Это руководство покажет вам, как установить и использовать клиент и сервер Telnet, если вы хотите узнать больше об этом древнем протоколе администрирования сервера или если вы хотите использовать клиент Telnet для тестирования своего почтового сервера. Мы НЕ рекомендуем использовать Telnet (сервер) на современных серверах, особенно если вы используете его через Интернет. Для управления сервером по сети используйте SSH вместо Telnet. Использование клиента Telnet — это нечто другое. Клиент Telnet — это полезный инструмент для тестирования вашего почтового или веб-сервера, например, как показано ниже.

Читайте также:  Настройка usb virtualbox linux

Требования

  • Сервер с установленной Ubuntu 22.04.
  • Пользователь без полномочий root с привилегиями sudo.
  • На вашем сервере настроен статический IP-адрес 192.168.0.100.

Установить Telnet-сервер

По умолчанию пакет сервера Telnet доступен в репозитории по умолчанию Ubuntu 20.04. Вы можете установить его, просто выполнив следующую команду:

sudo apt install telnetd -y

После завершения установки вы можете проверить состояние службы Telnet с помощью следующей команды:

sudo systemctl status inetd
? inetd.service - Internet superserver Loaded: loaded (/lib/systemd/system/inetd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2022-08-04 09:10:22 UTC; 24s ago Docs: man:inetd(8) Main PID: 1158 (inetd) Tasks: 1 (limit: 1114) CGroup: /system.slice/inetd.service ??1158 /usr/sbin/inetd Aug 04 09:10:22 ubuntu2204 systemd[1]: Starting Internet superserver. Aug 04 09:10:22 ubuntu2204 systemd[1]: Started Internet superserver.

Проверка подключения Telnet из удаленной системы

Сервер Telnet теперь установлен и прослушивает порт 23. Пришло время подключиться к серверу Telnet из удаленной системы.

Теперь войдите в другую систему Ubuntu и выполните следующую команду:

Вам будет предложено ввести имя пользователя и пароль. После успешной аутентификации вы должны увидеть следующий вывод:

Trying 192.168.0.100. Connected to 192.168.0.100. Escape character is '^]'. Ubuntu 22.04 LTS ubuntu2204 login: hitesh Password: Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.15.0-41-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage This system has been minimized by removing packages and content that are not required on a system that users do not log into. To restore this content, you can run the 'unminimize' command. Last login: Mon Jul 25 09:51:42 2022 from 192.168.0.22

Теперь вы можете выполнить любую команду на сервере Telnet, используя Telnet.

Используйте telnet для проверки открытых портов

Вы также можете использовать Telnet для проверки открытых портов в удаленной системе.

Читайте также:  Копирование всего содержимого папки linux

Например, чтобы проверить порт 80 в удаленной системе (IP 192.168.0.100), выполните следующую команду:

Если порт 80 открыт, вы должны увидеть следующий вывод:

Trying 192.168.0.100. Connected to 192.168.0.100. Escape character is '^]'.

Если порт 80 заблокирован или служба Telnet не запущена. Вы должны увидеть следующий вывод:

Trying 192.168.0.100. telnet: Unable to connect to remote host: Connection refused

Используйте команду Telnet для проверки почтового сервера

Команда Telnet также очень полезна для тестирования почтового сервера. Подключиться к почтовому серверу с помощью Telnet

Если соединение установлено успешно, вы увидите ответ от другого сервера, подобный этому:

Trying 192.168.0.100. 
Connected to 192.168.0.100.
Escape character is '^]'.
220 server1.example.com ESMTP Postfix (Debian/GNU)

Теперь вы можете ответить серверу с помощью команды ehlo, за которой следует ваше доменное имя отправителя. Пример:

Почтовый сервер покажет вам, какие методы он поддерживает.

250-server1.example.com
250-PIPELINING
250-SIZE
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-DSN
250-SMTPUTF8
250 CHUNKING

Чтобы выйти из соединения, введите команду quit.

221 2.0.0 Bye
Connection closed by foreign host.

Полная последовательность команд:

Эта тестовая процедура полезна, если вы хотите узнать, не заблокированы ли почтовые службы (порт 25) вашим интернет-провайдером или центром обработки данных.

Источник

Оцените статью
Adblock
detector