- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restict number of telnet sessions
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2004 09:10 PM
тАО04-06-2004 09:10 PM
Restict number of telnet sessions
My telnetd service should refuce conenctions after it has reached a number (say 100)
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2004 09:17 PM
тАО04-06-2004 09:17 PM
Re: Restict number of telnet sessions
Otherwise, you could script it in /etc/profile. Something like
[ `ps -ef | grep -v grep | grep telnetd | wc -l` -gt 100 ] && exit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2004 09:38 PM
тАО04-06-2004 09:38 PM
Re: Restict number of telnet sessions
you can do that.Once i faced the problem after 70 users i am not able to getting telnet connection.So I had to increase the some kernel parameters such as NPTY NSTRPTY and created the device files.I dunno whether the vice-versa will work.
I never tried that.
Regds
Radhakrishnan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2004 09:44 PM
тАО04-06-2004 09:44 PM
Re: Restict number of telnet sessions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2004 10:09 PM
тАО04-06-2004 10:09 PM
Re: Restict number of telnet sessions
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2004 10:23 PM
тАО04-06-2004 10:23 PM
Re: Restict number of telnet sessions
They don't have it at the porting center but it does compile on hpux.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2004 11:03 PM
тАО04-06-2004 11:03 PM
Re: Restict number of telnet sessions
If this is set to 100 and there are 100 telnet connections open,then it would reject new connections.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2004 12:17 AM
тАО04-07-2004 12:17 AM
Re: Restict number of telnet sessions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2004 12:25 AM
тАО04-07-2004 12:25 AM
Re: Restict number of telnet sessions
QTY=$(who | wc -l)
if [ $QTY -gt 100 -a $(id -u) -gt 0 ]
then
echo "\n\nSorry, no more connections allowed\n"
sleep 3
exit
fi
The above code is simpler than changing the kernel parameters and will not affect other service connections. Note that this counts every session even if the same user has logged in several times.
Bill Hassell, sysadmin