Skip to main content

sshd_config

Comments

5 comments

  • quizknows
    1) there should be a space as far as I know. 2) yes, you can close the port 22 once you move SSH to another port. Be sure to open that port first. 3) yes you can use any other un-used TCP port. 4) Listen address just tells the server which of it's own IP's to listen on. Leaving it default means you can SSH to any IP allocated to the server. If you change it to one of the IP's assigned to the server, that is the only IP that will accept SSH connections.
    0
  • debug
    [quote="quizknows, post: 1537651">1) there should be a space as far as I know. 2) yes, you can close the port 22 once you move SSH to another port. Be sure to open that port first.
    1) There is no space in sshd_config and its a new server since three days The file have been opened/edited today but not by me. Maybe it's a bad writing from WHM (it's the last version release). 2) I would like only disable password auth in WHM Security and remove the port 22 inside the two lists of CSF config file. I don't want use/move the port 22. My VPS is managed.
    0
  • quizknows
    cPanel doesn't install the stock sshd_config file, your operating system package manager (i.e. RPM or yum) does. What I'm saying is you can remove port 22 from csf config for open ports, but you have to add the new ssh port number to open ports before you change the port that SSH is using in sshd_config.
    0
  • debug
    [quote="quizknows, post: 1537681"> What I'm saying is you can remove port 22 from csf config for open ports, but you have to add the new ssh port number to open ports before you change the port that SSH is using in sshd_config.
    Yes, you are right. But my question was can I only delete the port 22 in incoming/outcoming ports CSF listing and forget the rest (without edit sshd_config) ? I am alone on my VPS (my own website) and the hoster have access to SSH with their tools.
    0
  • cPanelMichael
    [quote="debug, post: 1537691">Yes, you are right. But my question was can I only delete the port 22 in incoming/outcoming ports CSF listing and forget the rest (without edit sshd_config) ? I am alone on my VPS (my own website) and the hoster have access to SSH with their tools.
    Yes, you can do this but keep in mind that SSH will not be accessible. You will have to contact your hosting provider in the event WHM fails to load. Thank you.
    0

Please sign in to leave a comment.