Pages

Sunday, August 25, 2013

enable telnet on non default port, allow root login

Telnet deamon listen to port 23 by default. If you want to enable make it listen on different port(for example 2233), perform following steps:



For BusyBox telnet:

=> start telnetd on server as "telnetd -p 2233". This will run the deamon in background making it listen on port 2233.
=> from client, login as 'telnet <server ip> 2233'
=> Note that busybox telnet does not allow root login.


For ineutil telnet:

=>You will have a config file 'telnet' in /etc/xinetd.d/ directory
=> The file looks like 


# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE IPv4
socket_type = stream
only_from = 0.0.0.0
wait = no
server = /usr/sbin/in.telnetd
instances = 5
log_on_failure += USERID
disable = no
}

=> to this file, add entry

port = 2323

to change listening port. Also edit /etc/services file and modify 

telnet          23/tcp

to 

telnet          2323/tcp

To allow root login, add entry

user = root
If you want to restrict only certain clients to be able to login, modify 

only_from = <ip range>








No comments:

Post a Comment