3

I was curious if anyone had any ideas why when I run who and who --all, I still cannot see users logged in under notty?

See below:

[cbennett@lstn ~]$ who --all
           system boot  2016-04-25 09:20
           run-level 3  2016-04-25 09:20
LOGIN      ttyS0        2016-04-25 09:20              1997 id=tyS0
LOGIN      tty1         2016-04-25 09:22              2281 id=tty1
           pts/0        2016-04-25 10:30              2057 id=ts/0  term=0 exit=0
cbennett + pts/1        2016-04-25 09:28 05:13        2607 (redacted)
kbennett + pts/8        2016-04-25 15:57 00:04       20513 (redacted)
cbennett + pts/9        2016-04-25 15:53   .         19733 (redacted)
           pts/10       2016-04-25 16:00             20980 id=s/10  term=0 exit=0
[cbennett@lstn ~]$ ps aux | grep kbennett | grep '@'
kbennett 17373  0.0  0.5 151628  5472 ?        S    15:37   0:00 sshd: kbennett@notty
kbennett 20517  0.0  0.4 151628  4164 ?        S    15:57   0:00 sshd: kbennett@pts/8
[cbennett@lstn ~]$

As an example, I can run the following:

ssh example.com sleep 300

And now my ssh connection that's open to example.com for 300 seconds won't show up under the who command, yet it does under ps with @notty.

What gives?

1
  • 1
    Related. tl;dr there is no way except explicit ps or netstat. – Jakuje Apr 25 '16 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.