Is there any way on the server through which we can disable telnet. Also in case of a dedicated server i want to restrict SSH access to two persons only, what should i do ?
Is there any way on the server through which we can disable telnet. Also in case of a dedicated server i want to restrict SSH access to two persons only, what should i do ?
[SIZE=4][COLOR=RoyalBlue]Nakul's :cool: [/COLOR][/SIZE]
Hello,
HOW TO DISABLE TELNET
The telnet is a xinetd based service. But the xinetd daemon itself is systemv managed service.
The configuration file for xinetd daemon is /etc/xinetd.conf.
And the configuration file for telnet service is /etc/xinetd.d/telnet and/or /etc/xinetd.d/krb5-telnet
Edit /etc/xinetd.d/krb5-telnet
disable = no as disable = yes
save the changes and restart the xinetd service
# service xinetd restart
[NOTE: You can also configure xinetd daemon in /etc/xinetd.conf by using
different parameters for e.g.
# vi /etc/xinetd.conf
only_from =192.168.0.4
(services available for only clint 192.168.0.4)
only_from =192.168.0.0/24
(services available for entire network (class c network))
no_access =192.168.0.0/24
(services not available to entire network)
access_times =09:00-12:00
(services can be available only between 9Am to 12 noon) ]
(Please rectify me if I am making any mistake)
================================================== ==============================
HOW TO RESTRICT SSH TO TWO USERS ONLY
The configuration file for sshd daemon is /etc/ssh/sshd_config
Open the file add the following line below the line # Authentication:
AllowUsers user1 user2
If you want to restrict particular users from ssh access add the following line instead
DenyUsers user1 user2
Save the Changes and restart the sshd daemon
When AllowUser is configured All other userd are denied ssh access and if DenyUser used all
other users are Denied to ssh access.
When both the lines are added only users listed in AllowUsers will get access
no matter which line is put first.
-----------------------------------------------------------------------------------
To allow ssh access from particular host/hosts only you can use TCP Wrapper.
open the /etc/hosts.deny and add appropriate from following sample lines.
sshd: ALL EXCEPT 192.168.0.0/255.255.255.0 (IP Based) Allow only 192.168.0.0 network.
sshd: ALL EXCEPT 192.168.0.1 (Allow only one IP)
OR
sshd: ALL EXCEPT *.domain.com (Host Name) Allow only example.com network.
sshd: ALL EXCEPT host.domain.com (Allow only one host)
(Please correct me if I am making any mistake)
Hello,
One way of disabling telnet is through editing
the configuration file for telnet service
(/etc/xinetd.d/telnet and/or /etc/xinetd.d/krb5-telnet)
You can also do it the other way round!!![]()
You can disable telnet on your server through :
# chkconfig krb5-telnet off
or
# chkconfig krb5-telnet off
No need to restart the xinetd service
thereafter.So just through chkconfig,you can disable
telnet service.You can disable all the xinetd based
services in similar fashion through chkconfig!![]()
Please guide me if there is any other way of
doing it or correct me if I am wrong.![]()
Hello,
Yes, We can also do it with chkconfig
[B]Regards,
Mohd. Mazhar.
Shared Hosting | Web Hosting India | Dedicated Hosting
Bookmarks