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
Forums
Discussions
Discussions
Discussions
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
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
01-30-2006 01:04 PM
01-30-2006 01:04 PM
script
Do u have any script for killing old ssh process?
Cheers
Indrajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2006 01:43 PM
01-30-2006 01:43 PM
Re: script
1. How do you decide "old session"
2. Old logins/sessions do not terminate on it's own, it could be on account ssh also. Check your ssh version and update to latest.
3. Check ssh config files to see if you have any option there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2006 04:14 PM
01-30-2006 04:14 PM
Re: script
# ps -ef | grep ssh
kill them with kill command.
Or simply as,
# kill -9 `ps -ef | grep ssh | awk '{ print $2 }'`
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2006 04:19 PM
01-30-2006 04:19 PM
Re: script
You can stop all SSH process by,
#/sbin/init.d/secsh stop
or simply by,
# kill -9 `ps -ae |grep -i ssh |awk '{print $1}'`
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2006 05:57 AM
01-31-2006 05:57 AM
Re: script
i am trying to find some script which i can execute automatically through crontab or controlm.
The script should able to kill 15 days old ssh process.
Cheers
Indrajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2006 06:21 AM
01-31-2006 06:21 AM
Re: script
This gets greatly simplified if you leverage the UNIX95 (XPG4) mode of 'ps'.
For instance, if you wanted to discriminate "too long" on the elapsed time of a process, use 'etime':
# UNIX95= ps -C init -o pid= -o comm= -o etime=
This would return the 'pid', the 'comm'and name (basename) and the elapsed time of a process named by '-C' in this example, 'init'.
The value here is several fold. Using the '-C name' selects *only* processes matching 'name'. A grep for a name "tar" would also find processes named "start" -- probably not what you want!
The next value of the UNIX95 mode is that times, like the 'etime' are formatted in days, hours, minutes and seconds, like:
79-09:35:22
...for 79-days, 9-hours, 35-minutes and 22-seconds. This makes comparisons like greater than 15-days simple.
This should get you on the right path.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2006 12:55 PM
01-31-2006 12:55 PM
Re: script
Thanks a lot for ur kind support. i will try to write a script which may help me to kill old ssh process in an specific interval of time.
Thanks to James. i think ur input would help me to resolve my issue.
Cheers
Indrajit