0
0
Linux CLIscripting~5 mins

SSH config file in Linux CLI - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the SSH config file?
The SSH config file simplifies connecting to remote servers by storing connection details like hostname, user, and port. It lets you use short names instead of full commands.
Click to reveal answer
beginner
Which file path is the default SSH config file for a user?
The default SSH config file for a user is ~/.ssh/config. It stores personal SSH connection settings.
Click to reveal answer
beginner
What does the Host keyword do in an SSH config file?
The Host keyword defines a shortcut name for a remote server. You use this name with the ssh command instead of typing the full hostname and options.
Click to reveal answer
beginner
How do you specify a custom SSH port in the config file?
Use the Port option under a Host entry to set a custom port number for SSH connections to that host.
Click to reveal answer
beginner
Give an example of a simple SSH config entry for a server named 'myserver'.
Example:<br>
Host myserver
  HostName 192.168.1.10
  User alice
  Port 2222
This lets you connect by typing ssh myserver.
Click to reveal answer
Where is the SSH config file usually located for a user?
A~/.ssh/config
B/etc/ssh/ssh_config
C/var/ssh/config
D/usr/local/ssh/config
What keyword starts a new host entry in the SSH config file?
AServer
BHost
CMachine
DConnect
How do you specify the username for SSH in the config file?
AAccount
BUsername
CLogin
DUser
If your SSH server listens on port 2222, how do you set this in the config file?
APort 22
BListenPort 2222
CPort 2222
DServerPort 2222
What command lets you connect using the shortcut name defined in the SSH config file?
Assh shortcut
Bssh -c shortcut
Cssh connect shortcut
Dssh -host shortcut
Explain how an SSH config file can make connecting to servers easier.
Think about how you avoid typing long commands every time.
You got /5 concepts.
    Describe the structure of a basic SSH config file entry.
    What keywords and values do you write for each server?
    You got /5 concepts.