@@ -57,50 +57,48 @@ KiB Mem : 8008520 total, 5377448 free, 908264 used, 1722808 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 6806948 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9674 schnorr + 20 0 197068 6032 4196 S 10.3 0.1 225:29.90 ssh
10012 arrell_c 20 0 202292 11976 1264 R 10.3 0.1 1257:25 sshd
10043 arrell_c 20 0 202124 11052 4196 R 10.3 0.1 1350:13 ssh
27819 xie_ x 20 0 205632 10324 1228 R 10.3 0.1 3462:20 sshd
9629 schnorr+ 20 0 192728 3700 1220 S 6.9 0.0 211:37.81 sshd
10160 beard_c 20 0 201304 5908 1228 S 6.9 0.1 501:14.56 sshd
10193 beard_c 20 0 199268 8140 4192 R 6.9 0.1 535:54.23 ssh
17510 loehl_f1 20 0 198616 3028 1252 R 6.9 0.0 15:08.35 sshd
18082 lombosi+ 20 0 204092 15148 1252 S 6.9 0.2 3:42.87 sshd
18786 vallott+ 20 0 196448 5332 4188 S 6.9 0.1 1:36.56 ssh
19719 demirb_u 20 0 199692 4404 1228 S 6.9 0.1 71:23.15 sshd
23834 menzel_r 20 0 199096 3612 1204 R 6.9 0.0 156:01.83 sshd
23872 menzel_r 20 0 198564 7540 4192 R 6.9 0.1 167:02.21 ssh
9674 xxxxxx + 20 0 197068 6032 4196 S 10.3 0.1 225:29.90 ssh
10012 xxxxxx 20 0 202292 11976 1264 R 10.3 0.1 1257:25 sshd
10043 xxxxxx 20 0 202124 11052 4196 R 10.3 0.1 1350:13 ssh
27819 xxxxx x 20 0 205632 10324 1228 R 10.3 0.1 3462:20 sshd
9629 xxxxxx 20 0 192728 3700 1220 S 6.9 0.0 211:37.81 sshd
10160 xxxxxx 20 0 201304 5908 1228 S 6.9 0.1 501:14.56 sshd
10193 xxxxxx 20 0 199268 8140 4192 R 6.9 0.1 535:54.23 ssh
17510 xxxxxx 20 0 198616 3028 1252 R 6.9 0.0 15:08.35 sshd
18082 xxxxxx 20 0 204092 15148 1252 S 6.9 0.2 3:42.87 sshd
18786 xxxxxx 20 0 196448 5332 4188 S 6.9 0.1 1:36.56 ssh
19719 xxxxxx 20 0 199692 4404 1228 S 6.9 0.1 71:23.15 sshd
23834 xxxxxx 20 0 199096 3612 1204 R 6.9 0.0 156:01.83 sshd
23872 xxxxxx 20 0 198564 7540 4192 R 6.9 0.1 167:02.21 ssh
` ``
### Show all connections from a specific user:
` ``bash
[ ~]$ w div all_e
[ ~]$ w w ally _e
11:10:40 up 67 days, 5:32, 51 users, load average: 10.26, 7.79, 7.64
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
div all_e pts/0 pc11006.psi.ch 12Sep23 20days 12:03 0.36s sshd: div all_e [priv]
div all_e pts/10 satese-cons-06.p 11Sep23 17days 0.02s 0.02s -bash
div all_e pts/15 satese-cons-06.p Thu17 28:40 2:24m 2:24m ssh -XY sf-lca
div all_e pts/68 pc11006.psi.ch 03Oct23 4days 4:19m 4:19m ssh -XY sf-lc7a
div all_e pts/79 satesf-cons-07.p 26Sep23 13days 3:54m 3:54m ssh -CXY sf-lc7a
div all_e pts/85 pc11006.psi.ch 21Sep23 1:58m 11:01m 11:01m ssh -CXY sf-lc7a
w ally _e pts/0 pc11006.psi.ch 12Sep23 20days 12:03 0.36s sshd: w ally _e [priv]
w ally _e pts/10 satese-cons-06.p 11Sep23 17days 0.02s 0.02s -bash
w ally _e pts/15 satese-cons-06.p Thu17 28:40 2:24m 2:24m ssh -XY sf-lca
w ally _e pts/68 pc11006.psi.ch 03Oct23 4days 4:19m 4:19m ssh -XY sf-lc7a
w ally _e pts/79 satesf-cons-07.p 26Sep23 13days 3:54m 3:54m ssh -CXY sf-lc7a
w ally _e pts/85 pc11006.psi.ch 21Sep23 1:58m 11:01m 11:01m ssh -CXY sf-lc7a
` ``
### Show listing of last logged in users:
` ``bash
[ ~]$ last
brands pts/28 macstudvonhelge. Tue Oct 10 11:25 - 11:28 (00:03)
brands pts/42 macstudvonhelge. Tue Oct 10 11:17 - 11:17 (00:00)
brands pts/28 macstudvonhelge. Tue Oct 10 11:16 - 11:17 (00:00)
follath_ pts/41 pc9681.psi.ch Tue Oct 10 11:08 still logged in
kapeller pts/40 mela.psi.ch Tue Oct 10 10:58 still logged in
vallotto pts/39 nx-node-2.psi.ch Tue Oct 10 10:46 still logged in
bob_b pts/28 macstudvonhelge. Tue Oct 10 11:25 - 11:28 (00:03)
bob_b pts/42 macstudvonhelge. Tue Oct 10 11:17 - 11:17 (00:00)
bob_b pts/28 macstudvonhelge. Tue Oct 10 11:16 - 11:17 (00:00)
builder_b pts/41 pc9681.psi.ch Tue Oct 10 11:08 still logged in
[…]
` ``
### List all outbound connections for a specific user:
` ``bash
[ ~]$ pgrep -au div all_e | grep -w ssh
[ ~]$ pgrep -au w ally _e | grep -w ssh
8101 ssh -CXY sf-lc7a
9101 ssh -XY sf-lca
14058 ssh -CXY sf-lc7a
@@ -110,22 +108,22 @@ vallotto pts/39 nx-node-2.psi.ch Tue Oct 10 10:46 still logged in
### List all inbound connections for a specific user:
` ``bash
[ ~]$ pgrep -au div all_e | grep -w sshd
9066 sshd: div all_e@pts/15
14018 sshd: div all_e@pts/85
26857 sshd: div all_e@pts/79
30364 sshd: div all_e@pts/0
32177 sshd: div all_e@pts/10
32286 sshd: div all_e@pts/68
[ ~]$ pgrep -au w ally _e | grep -w sshd
9066 sshd: w ally _e@pts/15
14018 sshd: w ally _e@pts/85
26857 sshd: w ally _e@pts/79
30364 sshd: w ally _e@pts/0
32177 sshd: w ally _e@pts/10
32286 sshd: w ally _e@pts/68
` ``
Terminate Sessions
### The following command will terminate all sessions from user ‘ dival _e’ :
### The following command will terminate all sessions from user ‘ wally _e’ :
` ``bash
[ ~]$ sudo pkill -u brands
[ ~]$ sudo pkill -u wally_e
` ``
### The following command will terminate a specific sessions: