Help configuring SSH

Discussion in 'macOS' started by stevejobbers, Nov 13, 2009.

  1. stevejobbers macrumors member

    Aug 19, 2008
    I was planning on opening up SSH on my machine, but before I do so I wanted to know what precautions I need to take.

    I was thinking of changing the default SSH port of 22 to something else - is there a way to do this in OS X? If so, how?

    Also, is there a way to limit connection attempts? You know, something like only allowing 3 attempts per minute?

  2. ViViDboarder macrumors 68040


    Jun 25, 2008
    You can do all that but it would require command line settings.

    It's really easy to enable SSH on a mac though. You just do it in Settings>Sharing>Enable Remote Login

    Changing the default port shouldn't be too hard to do but I have never bothered with anything like that. Also, if you have a Dynamic IP it's hard to SSH in without using a service like Which I use to make it easy to remotely access my computers back home.

    Here's a short guide on configuring SSH. Just follow the Config portion of it and then skip the restart part and just reboot your computer.
  3. stevejobbers thread starter macrumors member

    Aug 19, 2008
    Thanks! I'll give it a shot!

    Also, I've used DynDns before to handle my ISP changing my IP address.
  4. belvdr macrumors 603

    Aug 15, 2005
    No longer logging into MR
    On OS X, edit /etc/sshd_config. Look for '#Port 22' (it is line 13 on 10.6.2). Remove the '#' sign and change 22 to whatever you want. Restart the SSH daemon.

Share This Page