LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2011, 04:35 PM   #1
d072330
Member
 
Registered: Nov 2007
Location: USA
Distribution: CentOS 5/6
Posts: 186

Rep: Reputation: 6
Telnet Question


If I only want to let a user be able to login via telnet a max number of times equal to 2 how would I go about doing this?

I have found this little tid bit:

per_source = 2

but that only allows 2 connections from the same source (i.e. network) and that would not work. For some reason our telnet sessions are not dying off after a user has shutdown their PC and then the next time they login it adds another telnet session.

Output:
Quote:
1. user1 31300 /dev/pts/409
2. user1 27539 /dev/pts/539
3. user1 18042 /dev/pts/316
4. user1 17256 /dev/pts/613
5. user1 27892 /dev/pts/1244
6. user1 23728 /dev/pts/912
7. user1 17189 /dev/pts/702
8. user1 11221 /dev/pts/775
9. user1 13807 /dev/pts/1001
10. user1 13936 /dev/pts/658
11. user1 22677 /dev/pts/1621
12. user1 18644 /dev/pts/1432
Questions.
How can I change the behavior of telnet to only allow 2 connections per user?

Can older connections be killed off by the user logging into a new telnet session?

If I change the settings for time alive below to say 15 minutes will that kill off any older sessions.

Quote:
tcp_keepalive_intvl = 75
tcp_keepalive_probes = 9
tcp_keepalive_time = 7200
FYI, most of our sessions are from plants or forklifts so this is only an issue when they go on break or lunch they do not exit the sessions like they are supposed to then they come back from break/lunch and start a new session.
 
Old 01-25-2011, 05:06 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Here is a Post that may be helpful:

http://www.linuxquestions.org/questi...inux---790926/

Regards,

Fordeck

Last edited by fordeck; 01-25-2011 at 06:01 PM.
 
Old 01-25-2011, 05:35 PM   #3
d072330
Member
 
Registered: Nov 2007
Location: USA
Distribution: CentOS 5/6
Posts: 186

Original Poster
Rep: Reputation: 6
Quote:
server_args = -IdleTimeout 600
I put that inside the krb5-telnet file and restart xinetd the telnet window pops up and goes away real quick. Is that a syntax error?
 
Old 02-24-2011, 11:42 AM   #4
d072330
Member
 
Registered: Nov 2007
Location: USA
Distribution: CentOS 5/6
Posts: 186

Original Poster
Rep: Reputation: 6
wrote a script to do this. Pretty cool. If anyone wants to see it let me know.
 
Old 02-24-2011, 11:49 AM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,208

Rep: Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611Reputation: 1611
Cool.

I would use SSH if possible.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet service question.. brown myeong Linux - Software 1 03-23-2007 11:39 AM
a telnet question... Adairen Linux - Newbie 3 08-27-2003 01:30 PM
telnet question gojoe Linux - Networking 4 05-22-2003 12:58 AM
telnet question jonfa Linux - General 3 04-09-2002 02:07 PM
Telnet Question jayakrishnan Linux - General 2 03-30-2002 11:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration