telnet Command in Linux

Learn via video courses
Topics Covered

Transform Your Career

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program

Overview

In this article, we will explore the telnet command in Linux, which is a user command that allows you to connect to remote servers using the Telnet protocol. The primary purpose of the telnet command is to test the connectivity and functionality of remote servers and devices over a TCP/IP network.

Linux telnet Command Syntax

The syntax for the telnet command is as follows:

Where:

  • options: Various flags and settings that modify the behavior of the command.
  • host: The remote server or device you want to connect to.
  • port: The port number to use for the connection (default is 23).

telnet Command Options:

  • -a: Attempt automatic login using the current username.
  • -E: Disable the escape character functionality (by default, the escape character is '^]').
  • -l user: Specify a username for automatic login.
  • -8: Use an 8-bit data path, allowing the transmission of 8-bit characters.
Free Courses by top Scaler instructors
Python Course for Beginners With Certification: Mastering the Essentials
Java Course - Mastering the Fundamentals
DBMS Course - Master the Fundamentals and Advanced Concepts
JavaScript Course With Certification: Unlocking the Power of JavaScript
C++ Course: Learn the Essentials
Python and SQL for Data Science Course
Python Course for Beginners With Certification: Mastering the Essentials
Java Course - Mastering the Fundamentals
DBMS Course - Master the Fundamentals and Advanced Concepts
JavaScript Course With Certification: Unlocking the Power of JavaScript
C++ Course: Learn the Essentials
Python and SQL for Data Science Course

Example Usages

  • Connect to a remote server using the default port.:

    Output:

    Explanation: This command connects to example.com using the default Telnet port (23).

  • Connect to a remote server using a specific port.:

    Output:

    Explanation: This command connects to example.com using port 8080.

Scaler Placement Report and Statistics

₹23L
AVG CTC
SCALER PLACEMENT PROOF

Scaler learners achieved 2.5x salary growth with average post-Scaler CTC reaching ₹23L.

11,000+placements
650+companies
Verified data
Hiring Partners:
GoogleGoogleAmazonAmazonMicrosoftMicrosoftFlipkartFlipkartAdobeAdobe1200+ more

Tips

  • Although telnet is an easy-to-use tool for testing connectivity, it is not secure and should not be used for sensitive data transmission.

Advanced Use Cases of telnet Command in Linux

  • Automatically log in with the current username.:

    Output:

    Explanation: This command attempts to log in to example.com using the current username.

  • Disable the escape character functionality.:

    Output:

    Explanation: This command connects to example.com and disables the escape character functionality.

  • Specify a username for automatic login.:

    Output:

    Explanation: This command connects to example.com and attempts to log in using the specified username 'user123'.

Turn Learning into Career Growth

1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary
1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary

Conclusion

  • The telnet command is a useful tool for testing connectivity and functionality of remote servers and devices over a TCP/IP network.

  • It supports various options to modify its behavior, such as automatic login and disabling the escape character functionality.

  • However, telnet is not secure and should not be used for sensitive data transmission.