PDA

Bekijk de volledige versie : dropbear



Bocsek
16-05-2008, 15:44
Hi! (sorry for my english)

Is there any way to know if somebody logged in to router through SSH (dropbear), except syslog?

Serpent
16-05-2008, 18:10
Hi!
Really, I don't get it what you want, more than you get from:

cat /tmp/syslog.log |grep dropbear
Try this, isn't enough?!?
Do you want to see failed auths?

Bocsek
16-05-2008, 18:28
It isn't enough, unfortunately.
I want to know if somebody logged in at the moment, and how many users connected at the same time.

Serpent
16-05-2008, 18:44
You're right, no logout info can be found in syslog.
Unfortunately, "who" isn't working as is supposed and there is no "finger" and "last"...

Bocsek
17-05-2008, 09:41
I've found the solution!

If the number, given by
ps -A | grep dropbear | wc -l | awk '{ print $1 }' is greater then 1, then there are user(s) logged in, or trying to login. If that number is 1, there are no SSH connections.

ABATAPA
17-05-2008, 09:54
I've found the solution!

If the number, given by
ps -A | grep dropbear | wc -l | awk '{ print $1 }' is greater then 1, then there are user(s) logged in, or trying to login. If that number is 1, there are no SSH connections.

ps -A | grep dropbear | grep -v grep | wc -l | awk '{ print $1 }'