I want to start the following command as a service on Mac OS X. Could anybody show me what is the correct way to do it on Catalina? Thanks.

ssh -D 1337 -q -C -N -f [email protected]


1 Answer 1


Here is an example using autossh, registered as a launchd service.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
     <string>[email protected]</string>

Some launchd documentation can be found here: https://www.launchd.info/

  • Where does autossh come from, how does it need to be configured?
    – nohillside
    Feb 3, 2022 at 10:28
  • I did brew install autossh but it doesn't really matter where it comes from. It does not need any configuration. It's just a wrapper around ssh.
    – Albert
    Feb 3, 2022 at 10:47
  • Might be worth to explain this in the answer.
    – nohillside
    Feb 3, 2022 at 10:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .