Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-17-2003, 09:52 AM
|
#1
|
Member
Registered: Nov 2001
Location: Exeter, UK
Distribution: Gentoo 1.4
Posts: 243
Rep:
|
killing a users ssh session
How do you kill someone elses ssh session?
|
|
|
03-17-2003, 10:04 AM
|
#2
|
Member
Registered: Nov 2001
Location: Exeter, UK
Distribution: Gentoo 1.4
Posts: 243
Original Poster
Rep:
|
You kill their ssh session.
|
|
|
03-17-2003, 10:23 AM
|
#3
|
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233
|
by finding the pid and killing it find out what pty terminal they are on (pty/#) and then look that pty terminal up in the process manager, and kill the pid with the ppid of 1 on that terminal, note i'm not sure, but i don't think stopping the sshd will affect any established connectcions, only prevent new ones
|
|
|
03-17-2003, 10:59 AM
|
#4
|
Member
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358
Rep:
|
ps aux -ww|grep $username |grep -v grep|grep sshd
will return something like:
m0rl0ck 1636 0.0 1.4 6048 1824 ? S 10:49 0:00 /usr/sbin/sshd
The second feild above is the PID so just :
kill -9 1636
or what ever the number happens to be.
|
|
|
03-17-2003, 11:05 AM
|
#5
|
Member
Registered: Nov 2001
Location: Exeter, UK
Distribution: Gentoo 1.4
Posts: 243
Original Poster
Rep:
|
Found the answer for my question, thanks anyway.
|
|
|
03-17-2003, 11:13 AM
|
#6
|
Member
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358
Rep:
|
Quote:
Found the answer for my question, thanks anyway.
|
What was it?
If you didnt kill it by pid how did you do it?
|
|
|
03-17-2003, 11:17 AM
|
#7
|
Member
Registered: Mar 2002
Location: ma
Distribution: slackware
Posts: 747
Rep:
|
i think he meant he found similar solution somewhere else and saw your answer
|
|
|
All times are GMT -5. The time now is 06:04 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|