Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
I don’t even understand why all the previous commentators write about the key, if you need to write about the user.
adduser <username> && sleep 600 && usermod --lock <username>
adduser <username>
echo usermod --lock <username> | at now + 60 minutes
And what's the point of giving it for an hour, if he can easily change it?
You can issue a key that will be deleted by the crown.
No, SSH uses simple crypto keys. They do not have the concept of "time", as in full-fledged PKI certificates. In other words, you either have a key or you don't.
But you can arrange this via PAM https://www.thegeekdiary.com/centos-rhel-how-to-re...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question