Quiz: SSH and Remote Access
Test your understanding of secure shell and remote system access.
1. What is SSH?
- Secure Shell - encrypted remote access protocol
- Simple Shell Host - basic terminal access
- System Shell Handler - process manager
- Super Shell - root access tool
Show Answer
The correct answer is A. SSH (Secure Shell) is a cryptographic network protocol for secure remote login and command execution. It encrypts all traffic, replacing insecure protocols like telnet and rsh.
Concept Tested: SSH Protocol
2. What is the basic syntax for connecting to a remote server via SSH?
- ssh hostname -u username
- ssh username@hostname
- connect username hostname
- remote username hostname
Show Answer
The correct answer is B. The standard SSH syntax is ssh username@hostname (or IP address). For example, ssh pi@192.168.1.50 connects as user "pi" to that IP address.
Concept Tested: SSH Command
3. What is an SSH key pair?
- Two password files
- A public key (shareable) and private key (secret) for authentication
- Two SSH sessions running together
- A backup and primary connection
Show Answer
The correct answer is B. An SSH key pair consists of a public key (shared with servers you want to access) and a private key (kept secret on your machine). Key-based authentication is more secure than passwords.
Concept Tested: SSH Keys
4. Where is your private SSH key typically stored?
- /etc/ssh/
- ~/.ssh/id_rsa or ~/.ssh/id_ed25519
- /var/ssh/private
- ~/keys/private
Show Answer
The correct answer is B. Private keys are stored in your ~/.ssh/ directory, typically named id_rsa (RSA) or id_ed25519 (Ed25519). The matching public key has .pub extension. Private keys should have 600 permissions.
Concept Tested: SSH Key Storage
5. What command generates a new SSH key pair?
- ssh newkey
- ssh-keygen
- generate-ssh-key
- ssh -create
Show Answer
The correct answer is B. ssh-keygen generates SSH key pairs. Run ssh-keygen -t ed25519 for modern Ed25519 keys. You'll be prompted for a location and optional passphrase for extra security.
Concept Tested: SSH Key Generation
6. What does scp do?
- Secure copy - transfers files over SSH
- System copy - copies system files
- Serial copy - copies to USB drives
- Server copy - duplicates servers
Show Answer
The correct answer is A. scp (secure copy) uses SSH to securely transfer files between computers. Syntax: scp file.txt user@host:/path/ to upload, or scp user@host:/path/file.txt . to download.
Concept Tested: SCP Command
See: Chapter 16 - SCP
7. What is a firewall in Linux?
- A temperature monitoring tool
- Software that controls network traffic based on rules
- A file backup system
- An anti-virus program
Show Answer
The correct answer is B. A firewall filters network traffic based on defined rules, controlling which connections are allowed or blocked. Linux uses iptables or nftables as the underlying firewall, often managed through ufw (Uncomplicated Firewall).
Concept Tested: Firewall
8. What does ssh-copy-id user@host do?
- Copies the SSH program to a remote server
- Copies your public key to the remote server for key-based login
- Creates a duplicate SSH session
- Copies user accounts between systems
Show Answer
The correct answer is B. ssh-copy-id copies your public key to a remote server's ~/.ssh/authorized_keys file, enabling passwordless SSH login from your machine.
Concept Tested: SSH Key Distribution
9. What is the default SSH port?
- 80
- 443
- 22
- 21
Show Answer
The correct answer is C. SSH uses port 22 by default. Changing the default port can provide some security through obscurity but shouldn't be relied upon as the only security measure.
Concept Tested: SSH Port
10. Why are SSH keys considered more secure than passwords?
- They're not more secure
- Keys are much longer and can't be guessed or brute-forced easily
- Keys are stored encrypted by default
- Keys expire automatically
Show Answer
The correct answer is B. SSH keys are cryptographically generated and typically 2048+ bits long, making them virtually impossible to brute-force. Passwords can be guessed, weak, or reused. Keys also can't be intercepted during login like passwords.
Concept Tested: SSH Security