Dedicated Servers
Managed Dedicated Servers
Semi-Dedicated Hosting
Cheap Dedicated Servers
Hyper-V VPS Hosting
Hyper-V Virtual Private Servers
Linux VPS Hosting
VPS Hosting with Root Access
Windows VPS Hosting
Windows VPS Web Hosting
Reseller Hosting
Reseller Hosting India
cPanel Shared Hosting
Linux Shared Web Hosting
Windows Hosting
Windows Shared Web Hosting
Web Hosting Blog
Web Hosting Blog India
Hosting Knowledgebase
Web Hosting Knowledgebase




  #1 (permalink)  
Old 07-04-2005, 11:20 PM
Junior Member
 
Join Date: Feb 2005
Posts: 9
Question Disable Telnet

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]
Reply With Quote
  #2 (permalink)  
Old 04-23-2006, 11:44 AM
Moderator
 
Join Date: Feb 2006
Posts: 19
Default Disable Telnet and restrict ssh connetction

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)
Reply With Quote
  #3 (permalink)  
Old 09-11-2006, 10:49 AM
Member
 
Join Date: Apr 2006
Posts: 41
Post Disable Telnet !!

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.
Reply With Quote
  #4 (permalink)  
Old 10-15-2006, 08:53 AM
Moderator
 
Join Date: Feb 2006
Posts: 19
Smile Disable telnet

Hello,

Yes, We can also do it with chkconfig

[b]Regards,
Mohd. Mazhar.
Shared Hosting | Web Hosting India | Dedicated Hosting
Reply With Quote
Reply

Bookmarks
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT. The time now is 01:47 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0