I'm very interested in how if one is able to list active and or previous scp connections via OpenSSH to *BSD, GNU machines.
Kinda like "last" does, without being forced to look in logfiles or netstat.
struct utmp ( in the utmp and wtmp files) has:
ut_id which may have information about remote connections/logins - devices
ut_host has the ip of incoming remote connections/logins
The last command uses wtmp for history, who uses utmp for what is going on now.
There is also in the same struct
ut_line - it is possible this (depending on your OS) may have some information about
outgoing terminals that you can decode. IMO POSIX is fuzzy on what goes here.
I'm not sure how useful this may be.
My best suggestion - scan through the wmtp file with some C code and see how your system records data.