Essential Tools Flashcards

1
Q

What is X11 Forwarding

A

The ability to send back a gui from the remote host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a server fingerprint

A

A server fingerprint is a unique identifier that gets replayed when you first connect. This is done to minimize the possibilty of a man in the middle attack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where is a ssh servers fingerprint stored

A

.ssh/known_hosts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the ssh -l flag key do

A

Allows you to specify a username

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the ssh -i flag key do

A

Allows you to specify a private key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you create the keys for ssh

A

ssh-keygen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the ssh-copy-id used for

A

Copying the public key over to the host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What do the rcp and sftp commands do

A

Copy files via ssh to the host

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where are ssh config files stored ?

A

Global ./etc/.ssh and per user ~/.ssh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What command searches bash history

A

ctrl r

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the meaning of su - -c “”

A

Run a command as a user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between su and su -

A

su just gives you an interactive shell where as su - also gives you a login shell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What file is not activated under just an interactive shell

A

.bash_profile

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the point of the sudo command

A

Allows you to run a command that you dont have day to day access to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between and archive and a compressed files.

A

An archive is a collection of files which can then be compressed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

tar -cvf archive_name.tar directory

A

Creates an archive

17
Q

What switch do you need to unarchive

A

x

18
Q

What are the two most common compression algorithms

A

gzip and bzip2

19
Q

Whats the gzip command to compress a file

A

gzip filename

20
Q

Whats the gzip command to decompress a file

A

gzip -d filename

21
Q

What is the command to compress a tar archive

A

tar -czvf archive_name.tar directory

22
Q

What is the command to decompress a tar archive

A

tar -xzvf archive_name.tar directory

23
Q

What is the difference between the locate and the find command

A

locate is quicker as it does not need to crawl the filesystem it uses its own internal search database

24
Q

Whats the command to see the first 3 lines of a file

A

head -n 3

25
Q

find source -type d -name mydir

A

Finds in the source location all directories withe name mydir

26
Q

What is the -type l switch for the find command

A

symlinks

27
Q

What is the -type f switch for the find command

A

files

28
Q

Whats the command to show the number of lines in a file

A

wc -l

29
Q

What command shows all the contents of a file

A

cat

30
Q

What are the commands to page through a file

A

more and less

31
Q

what is the octal permission for read

A

4

32
Q

what is the octal permission for write

A

2

33
Q

what is the octal permission for execute

A

1

34
Q

what is the chmod command for read write access to a group

A

cmod g +rw

35
Q

What are the suid and sgid bits

A

If the file permission segment has an s or the owner permission has a s that means the suid or sgid bit has been set which gives the fike access to files and processes owned by either the user or the group. However this cant be set for scripts. This is normally set on binary files.

36
Q

What is the sticky bit

A

The stick bit can be set on a file that gives people the ability to write to a file but only the owner can delete it.