Ubuntu 12.04 Telnet Server Download and Configuration
Telnet Server Ubuntu 12.04 Download and Installation Guide
Telnet is a terminal emulation program for TCP/IP networks that allows you to access another computer on the Internet or on a local network by logging on to the remote system. Telnet is a client-server protocol that connects to port 23 of the Transmission Control Protocol. You can also use Telnet to check open ports on a remote system.
Telnet Server Ubuntu 12.04 Downloadl
In this article, you will learn how to download and install the Telnet server and client on an Ubuntu 12.04 LTS server.
Download Telnet Server
By default, the Telnet server package is available in the Ubuntu 12.04 default repository. You can download it by just running the following command:
sudo apt-get install xinetd telnetd
These packages can be installed directly over existing installations of Build 9 Revision 1055 and later. Prior builds should be uninstalled before running this package.
Configuration settings can be saved using the export/import feature on the General Settings page or on the Configuration Management page of the Local Server Configuration program.
Install Telnet Server
Once the download is completed, you can install the Telnet server by just running the following command:
sudo apt-get install telnetd -y
Once the installation is completed, you can check the status of Telnet service using the following command:
sudo systemctl status inetd
You should see something like this:
? 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 ubuntu1204 systemd [1]: Starting Internet superserver...
Aug 04 09:10:22 ubuntu1204 systemd [1]: Started Internet superserver.
Test Telnet Connection from Remote System
Telnet server is now installed and listening on port 23. It's time to connect the Telnet server from the remote system.
Now, log in to another Ubuntu system and run the following command:
telnet 192.168.0.100
You will be asked to enter your username and password. After successful authentication, you should see something like this:
Trying 192.168.0.100...
Connected to 192.168.0.100.
Escape character is '^]'.
Ubuntu 12.04 LTS ubuntu1204 login: hitesh
Password:
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-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.
Use telnet to Test Open Ports
You can also use Telnet to test open ports on a remote system. For example, if you want to check if port 80 is open on a web server, you can run the following command:
telnet www.example.com 80
If port 80 is open, you should see something like this:
Trying xxx.xxx.xxx.xxx...
Connected to www.example.com.
Escape character is '^]'.
If port 80 is closed, you should see something like this:
Trying xxx.xxx.xxx.xxx...
telnet: Unable to connect to remote host: Connection refused
Use Telnet command to test a Mail Server
You can also use Telnet command to test a mail server by sending an email using SMTP protocol. For example, if you want to send an email from user@example.com to user@gmail.com using mail.example.com as SMTP server, you can run the following commands:
telnet mail.example.com 25
HELO example.com
MAIL FROM:user@example.com
RCPT TO:user@gmail.com
DATA
Type your email message here.
.
QUIT
If everything goes well, you should see something like this:
Trying xxx.xxx.xxx.xxx...
Connected to mail.example.com.
Escape character is '^]'.
220 mail.example.com ESMTP Postfix
HELO example.com
250 mail.example.com
MAIL FROM:user@example.com
250 Ok
RCPT TO:user@gmail.com
250 Ok
DATA
354 End data with .
Subject: Test email from telnet
Hello,
This is a test email sent from telnet.
Regards,
User
.
250 Ok: queued as A7B6C5D4E3F2G1H0I9J8K7L6M5N4O3P2Q1R0S9T8U7V6W5X4Y3Z2A1B0C9D8E7F6G5H4I3J2K1L0M9N8O7P6Q5R4S3T2U1V0W9X8Y7Z6A5B4C3D2E1F0G9H8I7J6K5L
QUIT
221 Bye
Connection closed by foreign host.
Conclusion
In this article, you learned how to download and install the Telnet server and client on an Ubuntu 12.04 LTS server. You also learned how to use Telnet to test open ports and mail servers.
Telnet is an unencrypted and therefore insecure protocol. This guide is for educational purposes only and is not a recommendation to use Telnet Server on your system. To manage your server over the network, use SSH instead of Telnet.
Use Telnet to Transfer Files
Telnet can also be used to transfer files between two systems using the File Transfer Protocol (FTP). FTP is a client-server protocol that allows you to upload and download files from a remote system. To use Telnet to transfer files, you need to have an FTP server running on the remote system and an FTP client on your local system.
To use Telnet as an FTP client, you can run the following command:
telnet ftp.example.com 21
You will be asked to enter your username and password for the FTP server. After successful authentication, you should see something like this:
Trying xxx.xxx.xxx.xxx...
Connected to ftp.example.com.
Escape character is '^]'.
220 Welcome to FTP Server
Name (ftp.example.com:hitesh): hitesh
331 Please specify the password.
Password:
230 Login successful.
Now, you can use FTP commands to transfer files. For example, you can use the following commands:
ls - list the files and directories on the remote system.
cd - change the current directory on the remote system.
get - download a file from the remote system to the local system.
put - upload a file from the local system to the remote system.
quit - exit the FTP session.
For example, if you want to download a file named test.txt from the remote system to the local system, you can run the following command:
get test.txt
You should see something like this:
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for test.txt (14 bytes).
226 Transfer complete.
14 bytes received in 0.00 secs (14.0000 kB/s)
Troubleshoot Telnet Connection Issues
Sometimes, you may encounter some issues while connecting to a Telnet server. Here are some common causes and solutions for Telnet connection issues:
The Telnet server is not running or listening on port 23. You can check if the Telnet server is running and listening on port 23 using the following command on the remote system:
sudo netstat -tulpn grep :23
If you don't see any output, it means that the Telnet server is not running or listening on port 23. You can start or restart the Telnet server using the following command:
sudo systemctl restart inetd
The firewall is blocking port 23 on the remote system. You can check if port 23 is open on the remote system using a tool like nmap or telnet itself. For example, you can run the following command on your local system:
nmap -p 23 192.168.0.100
If you see something like this:
Starting Nmap 7.91 ( https://nmap.org ) at 2022-08-04 09:53 UTC
Nmap scan report for 192.168.0.100
Host is up (0.00029s latency).
PORT STATE SERVICE
23/tcp filtered telnet
Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds
It means that port 23 is filtered by a firewall and you need to allow it on the remote system. You can use a tool like ufw or iptables to manage your firewall rules. For example, you can run the following command on the remote system to allow port 23 using ufw:
sudo ufw allow 23/tcp
The network connection is slow or unstable. You can check your network connection speed and stability using a tool like ping or traceroute. For example, you can run the following command on your local system:
ping -c 4 192.168.0.100
If you see something like this:
PING 192.168.0.100 (192.168.0.100) 56(84) bytes of data.
64 bytes from 192.168.0.100: icmp_seq=1 ttl=64 time=0.283 ms
64 bytes from 192.168.0.100: icmp_seq=2 ttl=64 time=0.276 ms
64 bytes from 192.168.0.100: icmp_seq=3 ttl=64 time=0.281 ms
64 bytes from 192.168.0.100: icmp_seq=4 ttl=64 time=0.280 ms
--- 192.168.0.100 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3063ms
rtt min/avg/max/mdev = 0.276/0.280/0.283/0.006 ms
It means that your network connection is fast and stable and there is no packet loss or high latency.
If you see something like this:
PING 192.168.0.100 (192.168.0.100) 56(84) bytes of data.
--- 192.168.0.100 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3071ms
It means that your network connection is slow or unstable and there is packet loss or high latency.
The username or password is incorrect or not allowed on the Telnet server.
Conclusion
In this article, you learned how to download and install the Telnet server and client on an Ubuntu 12.04 LTS server.
You also learned how to use Telnet to test open ports, mail servers and transfer files.
Telnet is an unencrypted and therefore insecure protocol.
This guide is for educational purposes only and is not a recommendation to use Telnet Server on your system.
To manage your server over the network, use SSH instead of Telnet.
Conclusion
In this article, you learned how to download and install the Telnet server and client on an Ubuntu 12.04 LTS server.
You also learned how to use Telnet to test open ports, mail servers and transfer files.
Telnet is an unencrypted and therefore insecure protocol.
This guide is for educational purposes only and is not a recommendation to use Telnet Server on your system.
To manage your server over the network, use SSH instead of Telnet. ca3e7ad8fd