Thursday, June 30, 2016

TELNET

                      # Telnet is used for remote login



SERVER


CLIENT
yum install telnet-*
No need telnet service’s
/etc/xinet.d/
telnet – is tool / utility / command
telnet  - edite & disable
telnet < server ip>
service xinetd reload
telnet 192.168.1.14
netstat -tulnp | grep -i 23  ---check port
no need to open 23 port
netstat –an | grep –i 23 ---check port
telnet 192.168.1.14 – used random port (Non-priviliged parts – above 1024 port
used) 1 to 1023 ---priviliged port
netstat –vatnp | grep –I 23 ---check port
Check PID  /   Port
Total Ports no - 65535
1024 to 65535 is called non priviliged
by default root login disabled in telnet
telnet 192.168.1.14
telnet – check port / remote login
Login – Champu – User through login
If you want root used
su - root
telnet is not secure
ssh is used for remote login
ssh – secure socket host


Telnet VS ssh
# Telnet – telnet transfer the ip packet in clear text mode

# ssh – Secure socket host
            ssh is transfer the ip packet in encryption  mode
            [ Public license key + Private key ]

---------------------------------------------------------------------------------------------------------------------

TELNET

[root@Localhost ~]# yum install -y telnet-* 

[root@Localhost ~]# rpm -qa | grep telnet  --- check Telnet Package 
telnet-0.17-48.el6.x86_64
telnet-server-0.17-48.el6.x86_64
---------------------------------------------------------------------------------------------------------------------
[root@Localhost xinetd.d]# cd /etc/xinetd.d   -- telnet is base service of xinetd
[root@Localhost xinetd.d]# ls
chargen-dgram   daytime-stream  echo-dgram   swat           time-dgram
chargen-stream  discard-dgram   echo-stream  tcpmux-server  time-stream
daytime-dgram   discard-stream  rsync        telnet
---------------------------------------------------------------------------------------------------------------------
[root@Localhost xinetd.d]# vim telnet   --- edit telnet file & disable telnet service

service telnet
{
        flags                    = REUSE
        socket_type         = stream
        wait                     = no
        user                     = root
        server                  = /usr/sbin/in.telnetd
        log_on_failure  += USERID
        disable         = no     --------------------- type “no” for disable service
}
---------------------------------------------------------------------------------------------------------------------
[root@Localhost xinetd.d]# service xinetd reload   ----   reload xinetd service
Reloading configuration:                                   [  OK  ]
---------------------------------------------------------------------------------------------------------------------
[root@Localhost xinetd.d]#  netstat -tulnp | grep -i 23  -- check telnet port

[root@Localhost xinetd.d]# netstat -an | grep -i 23
tcp        0      0 :::23                       :::*                        LISTEN      9876/xinetd    

---------------------------------------------------------------------------------------------------------------------

No comments:

Post a Comment