Skip to content

Instantly share code, notes, and snippets.

@paulvictor
Created October 6, 2021 05:52
Show Gist options
  • Save paulvictor/05610be9261016295ff1b5f670e31b4f to your computer and use it in GitHub Desktop.
Save paulvictor/05610be9261016295ff1b5f670e31b4f to your computer and use it in GitHub Desktop.
Mac plists
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Sets a name for a task -->
<key>Label</key>
<string>homebrew.gpg.gpg-agent</string>
<!-- Sets a command to run and its options -->
<key>ProgramArguments</key>
<array>
<string>/opt/homebrew/bin/gpgconf</string>
<string>--launch</string>
<string>gpg-agent</string>
</array>
<!-- Tells it to run the task once the XML is loaded -->
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Sets a name for a task -->
<key>Label</key>
<string>daemon.ssh-tunnel</string>
<!-- Sets a command to run and its options -->
<key>ProgramArguments</key>
<array>
<string>/Users/paul/.nix-profile/bin/ssh</string>
<string>-nNT</string>
<string>-i</string>
<string>/Users/paul/custom-ssh/temp-key</string>
<string>-R</string>
<string>0.0.0.0:8080:localhost:2223</string>
<string>viktor@139.59.33.149</string>
</array>
<!-- Tells it to run the task once the XML is loaded -->
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ThrottleInterval</key>
<integer>30</integer>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Sets a name for a task -->
<key>Label</key>
<string>daemon.sshd</string>
<!-- Sets a command to run and its options -->
<key>ProgramArguments</key>
<array>
<string>/Users/paul/.nix-profile/bin/sshd</string>
<string>-D</string>
<string>-f</string>
<string>/Users/paul/custom-ssh/sshd_config</string>
</array>
<!-- Tells it to run the task once the XML is loaded -->
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<dict>
<key>NetworkState</key>
<true/>
</dict>
</dict>
</plist>
Port 2223
HostKey /Users/paul/custom-ssh/ssh_host_rsa_key
AuthorizedKeysFile /Users/paul/.ssh/authorized_keys
ChallengeResponseAuthentication no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment