Run command on a given user SSH connection #44
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
DuckDuckGo and Google search Linux execute command on SSH connection.
A crontab would be a pretty bad solution.
Maybe can leverage authentication logs.
Output:
Could in theory modify
.bashrcbut I suspect that the user can avoid running this file, for instance by using SCP. Furthermore, the aim is to not trust the user to not remove this statement from.bashrc, as letting him the ability to modify this file.DuckDuckGo search Linux be notified of SSH connection.
Being notified when the user logs out would also be interesting but in a second time. Maybe
${PAM_TYPE} = "open_session"of https://www.it-connect.fr/linux-recevoir-un-e-mail-lors-dune-connexion-ssh/ would help.The purpose is to use
matrix-commander./etc/pam.scripts/ssh_alert.sh:Unsure if necessary:
/etc/pam.d/sshd:Without
&:Output:
Due to Benjamin-Loison/matrix-commander/issues/16.
With
&:Output:
Would be nice to exclude multiple users without using
and.The Stack Overflow answer 13408590 helped to correct the and usage.
The Stack Overflow question 11396740 may help.
Output:
Among-us-decentralized/blob/9d6b8c94c273b528c55ff12f56398d7f80116b5c/sources/main.cpp#L113
does not return anything.
to verify no connection during this algorithm establishment.