Linux telnet command guides

Telnet is the most known remote login server. Perhaps all computer background people familiar with telnet, at least to check server networking status (that's what network officers at my place do anyway!). However, in this tutorial we are going to do more than that.

Configure telnet server

Now let's take a closer look at the Linux telnet program itself. Normally telnet comes with all major Linux distributions. In Slackware Linux, the telnet daemon can be enabled in the super server, inetd (xinetd in Redhat and Fedora). At the command, type vim /etc/inetd.conf to activate telnet server. It's the same for other Linux distributions except for system V based distributions such as Redhat Linux and Fedora Linux.

[email protected]:~$ vim /etc/inetd.conf

Looking for # Telnet server like in the figure below:

# Telnet server:
# telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
#

Now remove # at the beginning line of the script by pressing x key on the keyboard to activate telnet server. Exit and save the inetd.conf file with command ':wq'. Restart the super server with command below:

[email protected]:~$ /etc/rc.d/rc.inetd restart

Using Linux telnet program

We have finish setting up the Linux telnet server in Slackware Linux. Let's testing the telnet server now. Please take note that in order to use the telnet program, we must have a network connection and a client computer, it doesn't matter whether Linux or windows installed. Remember that we use telnet to remotely manage a server.

To run a telnet program on windows computer, open command prompt by clicking on Start --> Run and type 'cmd'. Type telnet at the command prompt and press Enter. You should have something like the example figure below. This is a Microsoft Telnet Client.

Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>

Let's see what command can we use in telnet program. Type 'help' and Enter.

ftp> help
Commands may be abbreviated. Commands are:
c - close close current connection
d - display display operating parameters
o - open hostname [port] connect to hostname (default port 23).
q - quit exit telnet
set - set set options (type 'set ?' for a list)
sen - send send strings to server
st - status print status information
u - unset unset options (type 'unset ?' for a list)
?/h - help print help information
Microsoft Telnet>

So we can see that the command 'o' is used to open a connection to hostname. Type 'o' <hostname ip address> and press Enter:

Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet> o 192.168.0.5

If there is no problem with the network and port 23 for telnet is open, you'll get login prompt for the remote machine. Now that you already connected to the remote machine, login as usual, provide your account name and password. See telnet login example below:

Welcome to Linux 2.4.29 (tty1)

login: labu
Password:
[[email protected] labu]$

Back to Linux network command tutorial page.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.