Commit 24e543eb authored by Stratum 0 Powerberry's avatar Stratum 0 Powerberry
Browse files

Fixed detecting the correct user by its key-fingerprint

parent 435fb5c8
......@@ -2,7 +2,7 @@
export LANG=en_US.UTF-8
MID=$(ps -p $PPID -o ppid=| sed s/[^0-9]*//g)
SSH_ID=$(sed -ne "/sshd.$MID.:.*matching .SA key/{s/^.* //g;p;q}" /var/log/sshdusers.log)
SSH_ID=$(tail /var/log/sshdusers.log | sed -ne "/sshd.$MID.:.*matching .SA key/{s/^.* //g;p;q}")
NAME_FILE=/home/pi/stratumkey/keys/names/$SSH_ID
if [ -f $NAME_FILE ]
then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment