RE: Detecting whether a session is locally or remotely log ged in
"Tony Langdon (ATC)" <[email protected]>
| Newsgroups | gmane.org.user-groups.mlug.main |
|---|---|
| Message-ID | <61646882C848D81185530048546447F4920C87@mel-exchange.atctraining.com.au> |
> Are you trying to determine this from within the shell session or by > looking at it from the outside? Within the session > > If you're doing it from within the shell, then ssh usually sets a few > env variables which might be helpful. eg. SSH_CLIENT, > SSH_CONNECTION, > SSH_TTY. There might be others too... Obviously, they won't be > present if the shell is local to the system. I saw those. Thay might cover the cases I need to deal with, though there is a small probability of remote X sessions (which I also want the script to avoid)...