Chapter 20. Configuring SSH Flashcards

1
Q

Which two commands do you need to cache the passphrase that is set on your private key?

A

Use ssh-agent and ssh-add to cache the passphrase that is set on your private key.

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

You want to disallow root login and only allow user lisa to log in to your server. How would you do that?

A

Use AllowUsers lisa to disallow root login and only allow user lisa to log in to your server.

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

How do you configure your SSH server to listen on two different ports?

A

Specify the Port line twice to configure your SSH server to listen on two different ports.
in /etc/ssh/sshd_config

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

What is the name of the main SSH configuration file?

A

The main SSH configuration file is /etc/ssh/sshd_config.

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

When configuring a cache to store the passphrase for your key, where will this passphrase be stored?

A

The passphrase will be stored in a protected area in memory.

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

What is the name of the file that contains SSH client settings for all users?

A

/etc/ssh/ssh_config contains SSH client settings for all users.

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

Which setting should you use to set the maximum number of concurrent SSH sessions to 10?

A

The MaxSessions parameter that manages this feature is already set to 10 as a default, so you don’t need to change anything.

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

How do you configure SELinux to allow SSH to bind to port 2022?

A

semanage port -a -t ssh_port_t -p tcp 2022 configures SELinux to allow SSH to bind to port 2022.

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

How do you configure the firewall on the SSH server to allow incoming connections to port 2022?

A

firewall-cmd -add-port 2022/tcp –permanent;
firewall-cmd –reload
configure the firewall on the SSH server to allow incoming connections to port 2022.

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

Which setting could you use if you experience long timeouts while trying to establish an SSH connection?

A

Try UseDNS.

This option, which is active by default, uses DNS to get the name of the target host for verification purposes.

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