Linux Hardening Flashcards
Learning about Linux
What is the Required permissions to copy or move files in Linux?
r-x in the source directory and r on the source file, wx in the target directory and w on the target file __IF__ it already exists.
You need read permission to copy files, x to jump into both directories.
What are the 3 main branches of linux distributions?
Slackware
Red hat
Debian
What is the file that stores a clients private ssh key?
id_rsa
What is the file that stores a clients public ssh key?
id_rsa.pub
Where does the server store public keys of trusted clients?
authorized_keys
Stored in users home directory on server: ~/.ssh/authorized_keys
What does a shell do?
Read, evaluate, print, loop
Awaits input, performs command, prints results, awaits input, performs..
What is bash short for?
Bourne again shell
What does the cd command do?
changes directory
“cd “ or “cd ~” returns to user home folder
“cd ..” jumps to the directory above current one
“cd ../..” jumps two steps up above current one
“cd -“ jumps to previous directory
“cd /home/username/folder” jumps to specified path
What does the chmod command do?
Changes permission for a directory or file
Changes the — — — permissions
Who can use the chown command?
And what does it do?
Root
Changes the owner of a directory or file
In what folder is the systems configuration files stored?
/etc/
What user id does root have?
0
What are the names of the three data streams and their coresponding number?
stdin - 0
stdout - 1
stderr - 2
What does it mean to have x permission on a directory and file?
On a directory x means you can change directory to it
On a file x means you can run scripts
The x permission is not visible on files.
In what two ways can you use chmod?
chmod 777 (binary)
chmod ugo+rwx (ugo+permisson)
r = 4, w = 2, x =1 in binary.
752 would correspond to rwx r-x -w-