Changing SSH Port

Discussion in 'Mac Apps and Mac App Store' started by caucus, Nov 29, 2009.

  1. caucus macrumors newbie

    Nov 29, 2009
    Hello Great Ones

    As you know the default for the SSH is to use port 22

    I want to change the port to 123 (only example)

    I tried to change it in the config fle but it would not let me save the file/

    My questions are:

    How do I change the port connection when i try to use ssh to 123 and not 22?

    I am sure I need to edit a file but which one and how do I find the right file to edit?

    Thanks for all your help
  2. angelwatt Moderator emeritus


    Aug 16, 2005
    Sounds like you may not have edited the file with admin privileges, which would keep you from being able to save the changes. From Terminal add "sudo" to the front of the command to open the file in an editor.

Share This Page