Neddie
Posts: 35
Joined: Tue Feb 02, 2016 6:45 am

Monitoring whos connected to my pi

Wed Feb 08, 2017 2:22 pm

Hi to all.
Is it possible to tell who is connected (via Ethernet) to my pi at any time.
I'm looking for something similar to Windows "Computer Management"
where you can see who has what files open ,shares etc.
I'm sure it's possible. I've tried things like nmap , but that didn't give me what I want.
I may have been using it incorrectly though.Cheers
Neddie

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Monitoring whos connected to my pi

Wed Feb 08, 2017 2:50 pm

You'll have to define what services you want to monitor the usage of.
Filesharing ( Samba ) is just one such service. SSH which allows users to log in to a shell is another service. There are probably another couple of hundreds different services you could install on your Pi if you wanted. Linux is not tied together the way Windows is, so there is no common tool to monitor all services that allow remote connectivity.

https://www.cyberciti.biz/faq/how-do-i- ... ba-server/

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Monitoring whos connected to my pi

Thu Feb 09, 2017 11:48 am

The traditional commands "who" , "w" , "last" and "ps" don't count ?

Also interesting : "lsof" , "fuser" .

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Neddie
Posts: 35
Joined: Tue Feb 02, 2016 6:45 am

Re: Monitoring whos connected to my pi

Thu Feb 09, 2017 6:20 pm

Lets say monitoring SSH.
who , w , ps seem to work , but being new to Linux I need to figure them out still :0)
I don't know what half the info means :0(
Thanks
Neddie

Neddie
Posts: 35
Joined: Tue Feb 02, 2016 6:45 am

Re: Monitoring whos connected to my pi

Thu Feb 09, 2017 6:41 pm

I think who and w will work for me , thanks.
Neddie

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Monitoring whos connected to my pi

Thu Feb 09, 2017 7:31 pm

Neddie wrote:I think who and w will work for me , thanks.
Neddie
The other tool that's useful for shell logins (ssh, using the terminal) is "last" which will show who has logged in and when.

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Monitoring whos connected to my pi

Thu Feb 09, 2017 8:56 pm

pi@viking ~ $ grep -i 'session' /var/log/syslog
Feb 9 18:33:39 viking systemd[1]: Starting Session c13 of user root.
Feb 9 18:33:39 viking systemd[1]: Started Session c13 of user root.
Feb 9 18:40:55 viking systemd[24158]: Starting Exit the Session...
Feb 9 19:27:43 viking systemd[1]: Starting Session c14 of user pi.
Feb 9 19:27:43 viking systemd[1]: Started Session c14 of user pi.
Feb 9 19:28:28 viking systemd[24681]: Starting Exit the Session...
Feb 9 19:35:42 viking systemd[1]: Starting Session c15 of user pi.
Feb 9 19:35:42 viking systemd[1]: Started Session c15 of user pi.
pi@viking ~ $
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Beginners”