* How to kill SSH sessions?
@ 2002-06-26 18:34 Walsh, Ed
2002-06-26 18:40 ` Chris Omland
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Walsh, Ed @ 2002-06-26 18:34 UTC (permalink / raw)
To: linux-admin
Hi all,
I have one user who's been connected since May of this year. I'd like to
kill his SSH session but don't know how to do that. Can't seem to find
anything about how to do that. I've tried restarting the sshd service
(/sbin/service sshd restart, stop, and start) all don't make a difference.
Using RedHat 7.1 with OpenSSH.
Thanks,
Ed Walsh
Senior Systems Engineer
Wrenchead, Inc.
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: How to kill SSH sessions?
2002-06-26 18:34 How to kill SSH sessions? Walsh, Ed
@ 2002-06-26 18:40 ` Chris Omland
2002-06-26 18:46 ` Nathan
2002-06-26 19:00 ` Gary E. Miller
2 siblings, 0 replies; 8+ messages in thread
From: Chris Omland @ 2002-06-26 18:40 UTC (permalink / raw)
To: Walsh, Ed; +Cc: linux-admin
Well you could issue the following:
bash$ ps -aux|grep <username>
this will give you the process id of that user who is logged in...
then do this:
bash$ kill -9 <proccess_id>
I just tested it on myself and it worked fine.
Hope this helps.
-Chris
On Wed, 26 Jun 2002, Walsh, Ed wrote:
> Hi all,
> I have one user who's been connected since May of this year. I'd like to
> kill his SSH session but don't know how to do that. Can't seem to find
> anything about how to do that. I've tried restarting the sshd service
> (/sbin/service sshd restart, stop, and start) all don't make a difference.
> Using RedHat 7.1 with OpenSSH.
>
> Thanks,
>
> Ed Walsh
> Senior Systems Engineer
> Wrenchead, Inc.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to kill SSH sessions?
2002-06-26 18:34 How to kill SSH sessions? Walsh, Ed
2002-06-26 18:40 ` Chris Omland
@ 2002-06-26 18:46 ` Nathan
2002-06-26 19:00 ` Gary E. Miller
2 siblings, 0 replies; 8+ messages in thread
From: Nathan @ 2002-06-26 18:46 UTC (permalink / raw)
To: Walsh, Ed; +Cc: linux-admin
> Hi all,
> I have one user who's been connected since May of this year. I'd like to
> kill his SSH session but don't know how to do that. Can't seem to find
> anything about how to do that. I've tried restarting the sshd service
> (/sbin/service sshd restart, stop, and start) all don't make a difference.
> Using RedHat 7.1 with OpenSSH.
Hi Ed,
Not sure if this is the correct way or not, but it works for me.
I would type this from the command line:
#>ps afxu | grep -2 ssh
That should show you whish ssh process spawned his shell and you can kill
it will a kill -9
-Nate
> Thanks,
>
> Ed Walsh
> Senior Systems Engineer
> Wrenchead, Inc.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
"Whoever undertakes to set himself up as a judge of Truth and Knowledge is
shipwrecked by the laughter of the gods."
-- Albert Einstein
Chisolm's First Corollary to Murphy's Second Law:
When things just can't possibly get any worse, they will.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to kill SSH sessions?
2002-06-26 18:34 How to kill SSH sessions? Walsh, Ed
2002-06-26 18:40 ` Chris Omland
2002-06-26 18:46 ` Nathan
@ 2002-06-26 19:00 ` Gary E. Miller
2002-06-26 19:04 ` Chris Omland
2002-06-26 19:21 ` David Jackson
2 siblings, 2 replies; 8+ messages in thread
From: Gary E. Miller @ 2002-06-26 19:00 UTC (permalink / raw)
To: Walsh, Ed; +Cc: linux-admin
Yo Ed!
Well, the BOFH just kills them all:
killall sshd; sleep 20; sshd
Or do this to see which PID to kill
pstree -pul | less
Only newbies use 'ps'...
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 20340 Empire Blvd, Suite E-3, Bend, OR 97701
gem@rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676
On Wed, 26 Jun 2002, Walsh, Ed wrote:
> Hi all,
> I have one user who's been connected since May of this year. I'd like to
> kill his SSH session but don't know how to do that. Can't seem to find
> anything about how to do that. I've tried restarting the sshd service
> (/sbin/service sshd restart, stop, and start) all don't make a difference.
> Using RedHat 7.1 with OpenSSH.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to kill SSH sessions?
2002-06-26 19:00 ` Gary E. Miller
@ 2002-06-26 19:04 ` Chris Omland
2002-06-26 19:21 ` David Jackson
1 sibling, 0 replies; 8+ messages in thread
From: Chris Omland @ 2002-06-26 19:04 UTC (permalink / raw)
To: Gary E. Miller; +Cc: Walsh, Ed, linux-admin
O no...I'm a "newbie"...ps owns j00! =0).
On Wed, 26 Jun 2002, Gary E. Miller wrote:
> Yo Ed!
>
> Well, the BOFH just kills them all:
>
> killall sshd; sleep 20; sshd
>
> Or do this to see which PID to kill
>
> pstree -pul | less
>
> Only newbies use 'ps'...
>
> RGDS
> GARY
> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 20340 Empire Blvd, Suite E-3, Bend, OR 97701
> gem@rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676
>
> On Wed, 26 Jun 2002, Walsh, Ed wrote:
>
> > Hi all,
> > I have one user who's been connected since May of this year. I'd like to
> > kill his SSH session but don't know how to do that. Can't seem to find
> > anything about how to do that. I've tried restarting the sshd service
> > (/sbin/service sshd restart, stop, and start) all don't make a difference.
> > Using RedHat 7.1 with OpenSSH.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to kill SSH sessions?
2002-06-26 19:00 ` Gary E. Miller
2002-06-26 19:04 ` Chris Omland
@ 2002-06-26 19:21 ` David Jackson
2002-06-26 19:24 ` Gary E. Miller
1 sibling, 1 reply; 8+ messages in thread
From: David Jackson @ 2002-06-26 19:21 UTC (permalink / raw)
To: Gary E. Miller; +Cc: Walsh, Ed, linux-admin
"Gary E. Miller" wrote:
> Yo Ed!
>
> Well, the BOFH just kills them all:
>
> killall sshd; sleep 20; sshd
>
Let me make sure I understand, you going to kill every ssh login on a
"production" server?
Just besure to update you resume before you do.
And of course as any Linux person worth there salt could tell you, killall -HUP
sshd would a better,
>
> Or do this to see which PID to kill
>
> pstree -pul | less
>
> Only newbies use 'ps'...
Newbie and Linux users with 7 Years experience
David
>
>
> RGDS
> GARY
> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 20340 Empire Blvd, Suite E-3, Bend, OR 97701
> gem@rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676
>
> On Wed, 26 Jun 2002, Walsh, Ed wrote:
>
> > Hi all,
> > I have one user who's been connected since May of this year. I'd like to
> > kill his SSH session but don't know how to do that. Can't seem to find
> > anything about how to do that. I've tried restarting the sshd service
> > (/sbin/service sshd restart, stop, and start) all don't make a difference.
> > Using RedHat 7.1 with OpenSSH.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to kill SSH sessions?
2002-06-26 19:21 ` David Jackson
@ 2002-06-26 19:24 ` Gary E. Miller
2002-06-26 21:26 ` David Jackson
0 siblings, 1 reply; 8+ messages in thread
From: Gary E. Miller @ 2002-06-26 19:24 UTC (permalink / raw)
To: David Jackson; +Cc: linux-admin
Yo David!
On Wed, 26 Jun 2002, David Jackson wrote:
> > Well, the BOFH just kills them all:
> >
> > killall sshd; sleep 20; sshd
> >
>
> Let me make sure I understand, you going to kill every ssh login on a
> "production" server?
> Just besure to update you resume before you do.
Not ME, the BOFH. And yes I have seen many BOFH do this on production
systems knocking off hundreds of users. When the BOFH reports to the
technologically clueless CFO he fears nothing.
> > Or do this to see which PID to kill
> >
> > pstree -pul | less
> >
> > Only newbies use 'ps'...
>
> Newbie and Linux users with 7 Years experience
Yeah, but not us UNIX guys with 20 years. Work smarter, not harder.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 20340 Empire Blvd, Suite E-3, Bend, OR 97701
gem@rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to kill SSH sessions?
2002-06-26 19:24 ` Gary E. Miller
@ 2002-06-26 21:26 ` David Jackson
0 siblings, 0 replies; 8+ messages in thread
From: David Jackson @ 2002-06-26 21:26 UTC (permalink / raw)
To: Gary E. Miller; +Cc: linux-admin
Gary --
This is just between me and you :)
I once did a killalll netscape on a Sun Box.
When the man page warn " That killall isn't the same on on systems/OS".......
Let's just the the good news was it didn't bring the box "down" the bad news is
it killed all the init processes ....
Sorry I forgot about the BOFH stories.
David
"Gary E. Miller" wrote:
> Yo David!
>
> On Wed, 26 Jun 2002, David Jackson wrote:
>
> > > Well, the BOFH just kills them all:
> > >
> > > killall sshd; sleep 20; sshd
> > >
> >
> > Let me make sure I understand, you going to kill every ssh login on a
> > "production" server?
> > Just besure to update you resume before you do.
>
> Not ME, the BOFH. And yes I have seen many BOFH do this on production
> systems knocking off hundreds of users. When the BOFH reports to the
> technologically clueless CFO he fears nothing.
>
> > > Or do this to see which PID to kill
> > >
> > > pstree -pul | less
> > >
> > > Only newbies use 'ps'...
> >
> > Newbie and Linux users with 7 Years experience
>
> Yeah, but not us UNIX guys with 20 years. Work smarter, not harder.
>
> RGDS
> GARY
> ---------------------------------------------------------------------------
> Gary E. Miller Rellim 20340 Empire Blvd, Suite E-3, Bend, OR 97701
> gem@rellim.com Tel:+1(541)382-8588 Fax: +1(541)382-8676
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-06-26 21:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-26 18:34 How to kill SSH sessions? Walsh, Ed
2002-06-26 18:40 ` Chris Omland
2002-06-26 18:46 ` Nathan
2002-06-26 19:00 ` Gary E. Miller
2002-06-26 19:04 ` Chris Omland
2002-06-26 19:21 ` David Jackson
2002-06-26 19:24 ` Gary E. Miller
2002-06-26 21:26 ` David Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).