On October 19, 2021, we have enabled single-sign-on for our Plesk Support Center to provide a seamless login/account experience. This implies that you’ll be able to use a single account across any of our web-facing properties.
If you had already registered your account at Plesk 360 (formerly known as My Plesk) please use one for login. Otherwise please re-register it using the same email address as your existing Zendesk login (support account). It’s essential that you use the same email address on our support center to ensure that your tickets stay attached to the same account.

How to change the SSH port number on a Linux server

Follow

Comments

9 comments

  • Avatar
    Cirrus

    When changing SSH port, shouldn't related fail2ban jail be adjusted, too?

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    Hi Cirrus, yes it is also required to update fail2ban configuration. The article will be updated accordingly. 

    0
    Comment actions Permalink
  • Avatar
    John Bertin (Edited )

    Following this tutorial I was no longer access the server using SSH 

    After a bit of searching, I discovered that it is also necessary to add a custom rule in the Plesk firewall. Once I did this, I was able to access console on the new port. 

    PS. please update the guide to help others avoid being locked out as well. I used the following guide to solve the issue: https://support.plesk.com/hc/en-us/articles/115001078014-How-to-manage-firewall-rules-on-a-Plesk-for-Linux-server

     

     

     

     

    1
    Comment actions Permalink
  • Avatar
    Ivan Postnikov (Edited )

    @John,

    Yes, you are correct, the required port should be opened for connection in Plesk firewall or any alternative, which is used.

    That is why in the article we have the following note:

    "the new port must be opened in firewall."

    0
    Comment actions Permalink
  • Avatar
    b_p

    If you use a custom SSH port, the local GIT deployment configuration should consider this port as well when providing instructions: https://docs.plesk.com/en-US/onyx/administrator-guide/website-management/git-support/using-a-local-repository.75825/. Otherwise (i.e., right now), this renders the instructions useless since commands need to be changed manually.

    0
    Comment actions Permalink
  • Avatar
    Alexandr Nikolaenko

    Hello b_p,

    Thank you for bringing this to our attention. Indeed, in order to use GIT deployment over ssh the command should be modified to below ("ssh://" URL does not support relative paths):
    # git remote add origin ssh://user@example.com:22:/var/www/vhosts/example.com/git/test.git

    I will create a request to a concerned department to add a corresponding note to the documentation.

     

    0
    Comment actions Permalink
  • Avatar
    Grzegorz Wołoszyn

    Can you consider adding port information in client section where only IP address is visible?

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    Hello Grzegorz, could you please clarify a bit more for me where exactly you'd like to see it? Ideally with a screenshot. 

    0
    Comment actions Permalink
  • Avatar
    Kyllaz (Edited )

    Did all the steps but now i cannot login to SSH anymore, on port 22 it says conection refused and on the port i defined it says connection timed out. Any help on this? Btw i added it on plesk firewall as both income and outgoing rules.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request