Skip to main content
  1. Posts/

Restrict others from login your important Linux machine

·182 words·1 min· ·
Xianpeng Shen
Author
Xianpeng Shen
Table of Contents

If you have a critical machine like your team’s CI server that runs on Linux, so you don’t want every members in your group to access it.

Modifying this setting /etc/security/access.conf on Linux can do it.

How to setup
#

I commented out the access settings for TEAM A, and add some user accounts can access.

#+ : (SRV_WW_TEAM_A_CompAdmin) : ALL
+ : shenx, map, xiar : ALL

Be careful not to restrict everyone including yourself.

It would be best to allow several people can also access it to prevent any issues to log in with your account or you leave the organization.

Let’s test
#

Then when I try to use another account not in the list to access this machine and the connection shows closed.

$ ssh test@devciserver.organization.com
test@devciserver.organization.com's password:
Connection closed by 10.84.17.119 port 22

转载本站文章请注明作者和出处,请勿用于任何商业用途。欢迎关注公众号「DevOps攻城狮」

Related

C/C++ Code Formatting and Static Analysis—A One-Stop Workflow with Cpp Linter
·1281 words·7 mins
This article introduces tools and workflows for C/C++ code formatting and static analysis, focusing on the use and integration of clang-tools.
How to create GPG keys and add to GitHub
·370 words·1 min
This article explains how to create GPG keys, export the public key, and add it to GitHub for signing commits.
About
Developing on Windows Just Got Awesome using WSL + VS Code + Docker Desktop - Worth a Try
·731 words·2 mins
This article introduces how to develop on Windows using WSL, VS Code, and Docker Desktop. It provides detailed installation and configuration steps, as well as the advantages and experience of using these tools.
Docker, containerd, CRI, CRI-O, OCI, runc Explained and How They Work Together
·1235 words·6 mins
This article introduces the key components and standards in the container ecosystem, such as Docker, containerd, CRI, CRI-O, OCI, and runc, explaining their relationships and how they work together.
How to enable, configure and disable Jenkins LDAP
·183 words·1 min
This article explains how to enable and configure LDAP authentication in Jenkins, including how to disable it temporarily if needed.