Skip to content

Instantly share code, notes, and snippets.

@rryter
Last active April 29, 2020 05:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rryter/f5f439fd67ea049cad3a9e64bbc98269 to your computer and use it in GitHub Desktop.
Save rryter/f5f439fd67ea049cad3a9e64bbc98269 to your computer and use it in GitHub Desktop.
Trezor SSH Socket
<?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>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>Trezor SSH Socket</string>
<key>ProgramArguments</key>
<array>
<string>sh</string>
<string>-c</string>
<string>ln -s -f $SSH_TREZOR_SOCK ~/.ssh/trezor-agent/S.ssh &amp;&amp; /usr/local/bin/trezor-agent --foreground --sock-path $SSH_TREZOR_SOCK ~/.ssh/trezor.conf 2&gt; ~/.ssh/trezor-agent/error.log</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>Sockets</key>
<dict>
<key>ssh</key>
<array>
<dict>
<key>SecureSocketWithKey</key>
<string>SSH_TREZOR_SOCK</string>
<key>SockFamily</key>
<string>Unix</string>
<key>SockPathMode</key>
<integer>384</integer>
</dict>
</array>
</dict>
<key>ThrottleInterval</key>
<integer>0</integer>
</dict>
</plist>
@rryter
Copy link
Author

rryter commented Apr 28, 2020

The integer in the key SockPathMode is the decimal presentation of the octal POSIX permissions of the UNIX socket.
> Converter: 438 > 0666 > file permissions: rw-rw-rw- (owner, group, and anyone is allowed to read and write from/to the socket.

https://apple.stackexchange.com/a/313772/370450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment