exam questions

Exam XK0-005 All Questions

View all questions & answers for the XK0-005 exam

Exam XK0-005 topic 1 question 118 discussion

Actual exam question from CompTIA's XK0-005
Question #: 118
Topic #: 1
[All XK0-005 Questions]

A systems administrator frequently connects to a remote host via SSH and a non-standard port. The systems administrator would like to avoid passing the port parameter on the command line every time. Which of the following files can be used to set a different port value for that host?

  • A. /etc/ssh/sshd_config
  • B. /etc/ssh/moduli
  • C. ~/.ssh/config
  • D. ~/.ssh/authorized_keys
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
linux_admin
Highly Voted 1 year, 8 months ago
Selected Answer: C
The file that can be used to set a different port value for a specific remote host in SSH is option C, ~/.ssh/config. The ~/.ssh/config file is a per-user configuration file that SSH reads before connecting to a remote host. It allows users to set various SSH options for specific hosts, eliminating the need to pass these options on the command line every time.
upvoted 5 times
...
e418137
Most Recent 9 months ago
Selected Answer: A
Only the server side can change the port value in '/etc/ssh/sshd_config'.
upvoted 1 times
...
e418137
9 months ago
Ugh... these questions! "Which of the following files can be used to set a different port value for that host?" Only the server side can change the port value in '/etc/ssh/sshd_config'. By specifying the port on the client side in '~/.ssh/config', one need not specify the port every time from the command line, but this does not "set a different port value for that host." SMH. I surely hope the test is not like this.
upvoted 2 times
...
Alizadeh
1 year, 2 months ago
Selected Answer: C
The correct answer is C. ~/.ssh/config.
upvoted 2 times
...
Ckl22
1 year, 10 months ago
Selected Answer: C
Answer is C For an individual user's connections to a remote system, create and/or modify the client side's ~/.ssh/config file. For every user's connection to a remote system, create and modify the client side's /etc/ssh/ssh_config file.
upvoted 1 times
...
lo_01234_ol
1 year, 11 months ago
Selected Answer: C
Bottom of page here: https://askubuntu.com/questions/1110326/how-to-connect-to-a-certain-port-on-ssh
upvoted 2 times
...
MaryamNesa
1 year, 11 months ago
A is correct
upvoted 2 times
TheRealManish
1 year, 11 months ago
A is where the server side config resides. C is where the client side config resides. they are asking about changes to client, which happen on C
upvoted 4 times
Veteran903
1 year, 11 months ago
Exactly!!
upvoted 3 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago