Posted by: isaraffee | August 25, 2009

Exploring telnet in Mandrivia Spring 2009

Exploring telnet in Mandrivia Spring 2009

The telnet client and server are not installed by default.

[root@localhost init.d]# which telnet

which: no telnet in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/lib/qt4/bin)

Use the Install and removal Software to install the telnet client. You would not be able to search for the telnet server, telnetd.

Check that the telnet client is installed:

 

[root@localhost init.d]# which telnet

[root@localhost init.d]# which telnet

/usr/bin/telnet

Now to install the telnet server, you have to install the xinetd package. Again use the  Install and removal Software and locate xinetd package.

Once the xinetd package is installed, go to /etc directory and type:

[root@localhost init.d]# cd /etc

[root@localhost etc]# ls xi

xinetd.conf  xinetd.d/

[root@localhost etc]# ls xinet*

xinetd.conf

 

xinetd.d:

proftpd-xinetd  rsync  sshd-xinetd

 

You will find the xinetd.conf file.

 

You will also need to download telnet-server rpm and this is downloaded from the Internet.

After you have downloaded the package, install it by typing:

[root@localhost tmp]# rpm -ivh telnet-server-0.17-25.1.legacy.i386.rpm          

warning: telnet-server-0.17-25.1.legacy.i386.rpm: Header V3 DSA signature: NOKEY, key ID 731002fa                                                              

Preparing…                ########################################### [100%] 

   1:telnet-server          ########################################### [100%]

Now telnetd will run as an internet superserver. The telnetd program will be located in /usr/sbin/ directory.

[root@localhost tmp]# cd /usr/sbin                               

[root@localhost sbin]# ls in*                                    

inetdconvert*  in.ftpd@  in.proftpd@  in.telnetd*

 

Configure the telnetd in /etc/xinet.d directory

[root@localhost init.d]# cd /etc/xinetd.d

Create a file called telnetd-xinetd whose contents include the following lines:

[root@localhost xinetd.d]# more telnetd-xinetd

# default: off

# description: proftpd server, xinetd version. \

# Don’t run the standalone version if you run \

# this!

 

service telnet

{

        socket_type             = stream

        wait                    = no

        user                    = root

        server                  = /usr/sbin/in.telnetd

        log_on_success          += DURATION USERID

        log_on_failure          += USERID

        nice                    = 10

        disable                 = no

}

 

After you have save and quit the file. Restart the xinetd service/

[root@localhost xinetd.d]# cd /etc/init.d/

[root@localhost init.d]# ./xinetd restart

Stopping xinetd                                                 [  OK  ]

Starting xinetd                                                 [  OK  ]

 

Now telnet to your local machine using a user account:

[root@localhost init.d]# telnet 192.168.1.100

Trying 192.168.1.100…

Connected to 192.168.1.100 (192.168.1.100).

Escape character is ‘^]’.

Welcome to Mandriva Linux

————————-

login: ismail

Password:

Last login: Sun Aug 16 12:43:52 from 192.168.1.10

Yes you will be able to telnet using a user account. Now if you try to telnet using a root account, you will be deniied access.

 

To telnet using root user account performing the following steps:

Telnet to the machine using a user account. Once you are already logged in switch user to root

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: