Restrict user to one node

Bkumar

New Member
Credits
18
Hi,

I am cluster of say 20 nodes, I want to restrict a user to only one node (node_01). Is it possible to accomplish it. I am using Cent OS 7.8. Ie.., the user can ssh node_01 only. If any other node is used it would throw an error. Or does it have to dealt as a script if so how?

Thanks,
Bkumar
 


f33dm3bits

Gold Member
Gold Supporter
Credits
14,461
The information you are giving is pretty useless to answer your question but I will attempt an answer. You could set that specific user's login shell to /sbin/nologin on the nodes where they are not allowed to login, when they try to login they will get an error that the account is not available.
 
Last edited:
  • Like
Reactions: Rob
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Latest posts

Top