Drop Connection Command?

paste120

Registered
Using the terminal is there a way I can view the current connections to my mac and disconnect them. Say that someone telnet's to me can i disconnect them?
 
Oh, sorry - using the terminal, check the PID of their telnet sessions (ps -aux), and then kill that PID
 
Thanks, what if its a iTunes connection connected on port 49381?

This is the output of ps -aux
Theres too much stuff:
Code:
USER       PID %CPU %MEM      VSZ    RSS  TT  STAT STARTED      TIME COMMAND
juniorcl   760   0.7  4.5   361092  47672  ??  S    10:11AM   0:42.03 /Users/jun
juniorcl   346   0.7  0.6   152612   6484  ??  S     9:13AM   0:13.17 /System/Li
root       611   0.4  0.1    28356    656  ??  Ss    9:36AM   0:48.15 /Applicati
juniorcl   610   0.3  1.2   170980  12380  ??  S     9:36AM   0:54.64 /Applicati
root        90   0.0  0.2    30048   2144  ??  Ss    9:12AM   0:11.25 /usr/sbin/
root        91   0.0  0.1    27880    940  ??  Ss    9:12AM   0:00.13 /usr/sbin/
root        96   0.0  0.0    18676    268  ??  Ss    9:12AM   0:00.45 /usr/sbin/
root       120   0.0  0.0    27480    388  ??  Ss    9:12AM   0:01.16 netinfod -
root       122   0.0  0.0    18056    120  ??  Ss    9:12AM   0:00.58 update
root       125   0.0  0.0    18080    128  ??  Ss    9:12AM   0:00.00 dynamic_pa
root       145   0.0  1.2    48460  12528  ??  Ss    9:12AM   0:01.38 /System/Li
root       155   0.0  0.0    27340    132  ??  Ss    9:12AM   0:00.00 /usr/sbin/
root       156   0.0  0.1    27752    748  ??  Ss    9:12AM   0:00.47 /usr/sbin/
root       170   0.0  0.1    28896   1180  ??  Ss    9:12AM   0:00.22 /System/Li
root       172   0.0  0.0    27612    184  ??  Ss    9:12AM   0:00.00 cron
nobody     175   0.0  0.1    27996    856  ??  Ss    9:12AM   0:00.20 /usr/sbin/
juniorcl   182   0.0  5.3   751716  55280  ??  Ss    9:12AM   3:02.69 /System/Li
root       183   0.0  0.0    27336    388  ??  S     9:12AM   0:00.01 /usr/libex
juniorcl   185   0.0  0.4    83120   3848  ??  Ss    9:12AM   0:02.59 /System/Li
juniorcl   188   0.0  0.5   131876   5288  ??  Ss    9:12AM   0:02.77 /System/Li
root       192   0.0  0.3    32244   2920  ??  Ss    9:12AM   0:01.63 /usr/sbin/
root       211   0.0  0.1    29176   1152  ??  Ss    9:13AM   0:04.79 /usr/sbin/
root       238   0.0  0.0    27328    144  ??  Ss    9:13AM   0:00.00 /usr/libex
root       276   0.0  0.0    20120    160  ??  Ss    9:13AM   0:00.00 nfsiod -n 
root       285   0.0  0.0    18112    144  ??  Ss    9:13AM   0:00.00 rpc.lockd 
root       288   0.0  0.1    29760   1320  ??  Ss    9:13AM   0:00.47 /usr/sbin/
root       303   0.0  0.1    28976    932  ??  Ss    9:13AM   0:00.02 /usr/sbin/
root       313   0.0  0.0    18320    300  ??  Ss    9:13AM   0:00.73 ntpd -f /v
root       318   0.0  0.0    18056    128  ??  Ss    9:13AM   0:00.01 /usr/sbin/
root       320   0.0  0.2    30060   2064  ??  Ss    9:13AM   0:03.56 /usr/sbin/
juniorcl   336   0.0  0.3   136908   3048  ??  S     9:13AM   1:29.24 /Library/S
juniorcl   337   0.0  0.2    45420   1624  ??  Ss    9:13AM   0:00.34 /System/Li
juniorcl   343   0.0  0.5   155416   5020  ??  S     9:13AM   0:05.40 /System/Li
juniorcl   347   0.0  1.8   177700  19148  ??  S     9:13AM   0:10.52 /System/Li
juniorcl   353   0.0  0.8   155884   8276  ??  S     9:13AM   0:06.01 /Applicati
juniorcl   354   0.0  0.2   142288   2436  ??  S     9:13AM   0:00.19 /Applicati
juniorcl   355   0.0  0.4   143860   3988  ??  S     9:13AM   0:01.57 /System/Li
juniorcl   356   0.0  0.2   134008   2040  ??  S     9:13AM   0:00.11 /Applicati
juniorcl   358   0.0  0.5   145804   4916  ??  S     9:14AM   0:19.75 /System/Li
Administ   369   0.0  0.5   130896   5248  ??  Ss    9:15AM   0:01.54 /System/Li
Administ   370   0.0  0.3    56136   2688  ??  S     9:15AM   0:00.44 /System/Li
Administ   376   0.0  0.2   118984   2316  ??  S     9:15AM   0:03.60 /Library/S
Administ   377   0.0  0.2    45420   2052  ??  Ss    9:15AM   0:00.14 /System/Li
Administ   381   0.0  0.6   142812   6160  ??  S     9:15AM   0:00.78 /System/Li
Administ   382   0.0  0.1    27904    924  ??  S     9:15AM   0:00.04 aped
Administ   384   0.0  0.6   151384   5860  ??  S     9:15AM   0:01.02 /System/Li
Administ   385   0.0  1.1   167516  11740  ??  S     9:15AM   0:01.75 /System/Li
Administ   387   0.0  0.9   156668   9400  ??  S     9:15AM   0:03.77 /Applicati
Administ   390   0.0  0.1    36632   1380  ??  S     9:15AM   0:00.04 /System/Li
Administ   394   0.0  1.2   143420  12652  ??  S     9:15AM   0:01.99 /Users/Adm
root       692   0.0  0.2    35124   2132  ??  Ss    9:38AM   0:00.90 AppleFileS
root       702   0.0  0.1    31176    900  ??  Ss    9:38AM   0:00.03 slpd -f /e
juniorcl   748   0.0  0.1    27904    924  ??  S     9:48AM   0:00.05 aped
juniorcl   757   0.0  0.9   155520   9184  ??  S    10:02AM   0:03.09 /Applicati
juniorcl   758   0.0  0.1    36632   1384  ??  S    10:02AM   0:00.02 /System/Li
juniorcl   770   0.0  0.6   152620   6448  ??  S    10:17AM   0:00.50 /Applicati
root       771   0.0  0.0    27540    488 std  Ss   10:17AM   0:00.01 login -pf 
juniorcl   772   0.0  0.1    18644    760 std  S    10:17AM   0:00.01 -bash
root       773   0.0  0.0    18132    360 std  R+   10:17AM   0:00.01 ps -aux
root         1   0.0  0.0    18072    304  ??  Ss    9:12AM   0:00.02 /sbin/init
root         2   0.0  0.0    18604    244  ??  Ss    9:12AM   0:00.45 /sbin/mach
root        82   0.0  0.0    18092    208  ??  Ss    9:12AM   0:00.09 /usr/sbin/
root        88   0.0  0.1    28912   1552  ??  Ss    9:12AM   0:01.42 kextd
 
Ok I did but what did it do? Where did the output go? Would that work for public file sharing connections too?
 
Back
Top