XK0-005 · Question #788
A Linux administrator wants to change the default SSH server port. Which of the following files should the administrator edit to accomplish this task?
The correct answer is A. /etc/ssh/sshd_config. To change the default listening port for the SSH server, the administrator must modify the Port directive within the SSH daemon's configuration file.
Question
A Linux administrator wants to change the default SSH server port. Which of the following files should the administrator edit to accomplish this task?
Options
- A/etc/ssh/sshd_config
- B~/.ssh/config
- C/etc/ssh/ssh_config
- D/etc/ssh/ssh_host_rsa_key
How the community answered
(51 responses)- A88% (45)
- B2% (1)
- C6% (3)
- D4% (2)
Why each option
To change the default listening port for the SSH server, the administrator must modify the `Port` directive within the SSH daemon's configuration file.
The `/etc/ssh/sshd_config` file is the primary configuration file for the SSH daemon (`sshd`), which is the server-side component. To change the port on which the SSH server listens for incoming connections, the `Port` directive within this file must be edited.
The `~/.ssh/config` file is a user-specific client-side configuration file for the `ssh` command, used to configure client connections to remote servers.
The `/etc/ssh/ssh_config` file is the system-wide client-side configuration file for the `ssh` command, which affects how local users connect to remote SSH servers.
The `/etc/ssh/ssh_host_rsa_key` file contains the private RSA host key used by the SSH server for cryptographic identification, not a configuration setting for its listening port.
Concept tested: SSH server configuration (port)
Source: https://man7.org/linux/man-pages/man5/sshd_config.5.html
Topics
Community Discussion
No community discussion yet for this question.