This repository was archived by the owner on Jan 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
User Management
Milad Khakpour edited this page Jan 10, 2020
·
5 revisions
- Add user to sudoers
- add user directly to sudoers
- add user file to sudoers.d: it is better to have users here as the distribution update can overwrite the "sudoers" file.
https://www.pluralsight.com/blog/it-ops/linux-file-permissions
Owner/Group/Everyone r(4)/w(2)/x(1) 700 --> rwx------ 644 --> rw-r--r--
- we can add user to sudoers or add user to group that has the specific permissions.
- man -wK "String for search"
- man -wk command
- apropos command
Local Machine --> Private Key Server --> Public Key
- (local)
ssh-keygen - (local) two files are created: example
exampleAuth&exampleAuth.pub -
exampleAuth.pubis going to be copied in Server - (Server)
touch ~/.ssh/authorized_key - copy&paste
exampleAuth.pubto it - (Server)
chmod 700 .shhfolder - (Server)
chmod 644 ~/.ssh/authorized_keyfile - (local)
ssh user@server-ip -p serverPort -i <path-to-private-key(exampleAuth)> - (Server) disable basic password login
- (Server) edit file
/etc/ssh/ssh_configand changePasswordAuthenticationto no - (Server) restart ssh service
service ssh restartorsystemctl restart ssh
Amazon AWS
Notes
Linux
- Linux Security
GIT