Chapter 20. Configuring SSH Flashcards
Which two commands do you need to cache the passphrase that is set on your private key?
Use ssh-agent and ssh-add to cache the passphrase that is set on your private key.
You want to disallow root login and only allow user lisa to log in to your server. How would you do that?
Use AllowUsers lisa to disallow root login and only allow user lisa to log in to your server.
How do you configure your SSH server to listen on two different ports?
Specify the Port line twice to configure your SSH server to listen on two different ports.
in /etc/ssh/sshd_config
What is the name of the main SSH configuration file?
The main SSH configuration file is /etc/ssh/sshd_config.
When configuring a cache to store the passphrase for your key, where will this passphrase be stored?
The passphrase will be stored in a protected area in memory.
What is the name of the file that contains SSH client settings for all users?
/etc/ssh/ssh_config contains SSH client settings for all users.
Which setting should you use to set the maximum number of concurrent SSH sessions to 10?
The MaxSessions parameter that manages this feature is already set to 10 as a default, so you don’t need to change anything.
How do you configure SELinux to allow SSH to bind to port 2022?
semanage port -a -t ssh_port_t -p tcp 2022 configures SELinux to allow SSH to bind to port 2022.
How do you configure the firewall on the SSH server to allow incoming connections to port 2022?
firewall-cmd -add-port 2022/tcp –permanent;
firewall-cmd –reload
configure the firewall on the SSH server to allow incoming connections to port 2022.
Which setting could you use if you experience long timeouts while trying to establish an SSH connection?
Try UseDNS.
This option, which is active by default, uses DNS to get the name of the target host for verification purposes.