telnet is very important protocol used to connect remote systems via command line. It has some security defects but used widely because of its simple and widespread usage. In this tutorial we will learn
Install Telnet From Windows Command Line
We have all ready examined how to install
telnet in Windows operating systems. This can be looked from following tutorial.
In this case we will use
dism tool from command line. This will also require
> Dism /Online /Enable-feature /FeatureName:TelnetClient
Install Telnet For Ubuntu, Debian, Mint, Kali
We can install
telnet client with the following command for Ubuntu, Debian, Mint, Kali.
$ sudo apt install telnet
Install Telnet For Fedora, CentOS, RedHat
We can install
telnet client with the following command for Fedora, CentOS, RedHat .
$ sudo yum install telnet
Connect Remote Telnet Server
We can connect a remote telnet service with the
telnet command like below. We just need to specify the remote system IP address or host name. In this example we will connect
$ telnet 192.168.142.138
We will also provide the user name and password.
Connect Remote Telnet Server with Different Port Number
Default telnet port is TCP/23. But in some cases we can change port number for security reasons. If so we need to specify the port number explicitly. We will add the port number after the IP address or host name. In this example we will connect remote telnet port 2323 .
$ telnet poftut.com 2323
Start Telnet Interactive Shell
Now we start using telnet interactive shell. Interactive shell provides some commands specially created for
telnet. We can start a telnet interactive shell with
telnet command like below.
In order to list all commands provided by telnet interactive shell and their explanation we can use
help command like below.
As we can see that command short and long usage with explanation.
We can use
open command in order to connect remote system. We can also use
o short usage form by providing the remote system IP address or host name.
> o 192.168.142.138
We can use
close command in in order to close current connection to the remote system.
Telnet provides terminal functions. Terminals provides some features which can be displayed with the
- We can see that Escape Character is `CTRL+ü`
- `NTLM` authentication enabled
- Local echo is off
- New line mode is CR & LF
- Current mode is console
- Preferred termina type is ANSI
If we want to exit from the current telnet interactive shell we can use
quit command. Alternative is
We can enable given terminal settings with
set command. We can list avaiable settings with
> set ?
unset is used to disable given terminal option which is the reverse of
> unset ntlm
status command will list current connection status. We can list current status with
s command too. In this example we can see that there is no connection.