Sponsored Content
Operating Systems Solaris Elegant Solutions to kill telnet/ssh session Post 302430334 by verdepollo on Thursday 17th of June 2010 09:38:22 AM
Old 06-17-2010
Your script is killing SSH sessions, not telnet sessions.

A simpler solution would be to add the following line to sshd_config and restart the daemon.

Code:
DenyUsers user1

And check the sshd_config man page, there is an option called "Banner" - (Banner to be printed before authentication starts) Smilie

Last edited by verdepollo; 06-17-2010 at 10:44 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

telnet session timeout

hi, we can set something such that if the user has been idle for a while, it will auto disconnect. where to do so? thanks (6 Replies)
Discussion started by: yls177
6 Replies

2. Shell Programming and Scripting

Telnet Session

{ sleep 2 echo "$user" sleep 2 echo "$password" sleep 2 echo " ls" sleep 10 echo "exit" }| telnet $server I have a machine x and i have executed the above script on machine 'x'. i entered the... (6 Replies)
Discussion started by: pathanjalireddy
6 Replies

3. UNIX for Dummies Questions & Answers

Unix Telnet session

Hi Is there any way whilst in a telnet session you can view your client machine name that you are using to connect to the Unix box ? :eek: (2 Replies)
Discussion started by: mlucas
2 Replies

4. Solaris

kill user session

how do i kill a user session (10 Replies)
Discussion started by: fsmadi
10 Replies

5. UNIX for Dummies Questions & Answers

Telnet Session to AIX

Hello, I have AIX 5.3 at home connected to netgear router. Port Forwarding has been enabled on the router. Problem is that if I want to telnet, I have to try 2 or 3 times before I can get a logon prompt. It times out for first or second time (Connection to session <IP_Address> failed: Connection... (1 Reply)
Discussion started by: bluebee
1 Replies

6. Shell Programming and Scripting

could not send commands SSH session with Net::SSH::Expect

I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands. With the putty I can connect to the device and execute the commands without any issues. Here is the sample script my $ssh =... (0 Replies)
Discussion started by: hansini
0 Replies

7. HP-UX

ssh session getting hung (smilar to hpux telnet session is getting hung after about 15 minutes)

Our network administrators implemented some sort of check to kill idle sessions and now burden is on us to run some sort of keep alive. Client based keep alive doesn't do a very good job. I have same issue with ssh. Does solution 2 provided above apply for ssh sessions also? (1 Reply)
Discussion started by: yoda9691
1 Replies

8. Shell Programming and Scripting

Function to kill the established rsh session

HI I know that it sounds crazy :eek: appreciated if any one provided me a solution for my below case , the below script is checking the Database availability on many servers by establishing rsh session ( one by one ) , sometime one of the servers goes down and while this the script taking... (0 Replies)
Discussion started by: bejo4ever
0 Replies

9. Solaris

Kill idle dt session

Hi, i need to kill the idle dt sessions through script, can anyone tell me how to do? RJS (2 Replies)
Discussion started by: rajasekg
2 Replies
rt-clean-sessions(8)					     Request Tracker Reference					      rt-clean-sessions(8)

NAME
rt-clean-sessions - clean old and duplicate RT sessions SYNOPSIS
rt-clean-sessions [--debug] [--older <NUM>[H|D|M|Y]] rt-clean-sessions rt-clean-sessions --debug rt-clean-sessions --older 10D rt-clean-sessions --debug --older 1M rt-clean-sessions --older 10D --skip-user DESCRIPTION
Script cleans RT sessions from DB or dir with sessions data. Leaves in DB only one session per RT user and sessions that aren't older than specified(see options). Script is safe because data in the sessions is temporary and can be deleted. OPTIONS
older Date interval in the "<NUM>[<unit>]" format. Default unit is D(ays), H(our), M(onth) and Y(ear) are also supported. For example: "rt-clean-sessions --older 1M" would delete all sessions that are older than 1 month. skip-user By default only one session per user left in the DB, so users that have sessions on multiple computers or in different browsers will be logged out. Use this option to avoid this. debug Turn on debug output. NOTES
Functionality similar to this is implemented in html/Elements/SetupSessionCookie ; however, that does not guarantee that a session will be removed from disk and database soon after the timeout expires. This script, if run from a cron job, will ensure that the timed out sessions are actually removed from disk; the Mason component just ensures that the old sessions are not reusable before the cron job gets to them. perl v5.14.2 2013-05-22 rt-clean-sessions(8)
All times are GMT -4. The time now is 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy