diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..cf1ab25 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c55313d --- /dev/null +++ b/README.rst @@ -0,0 +1,95 @@ +=============== +mac-ssh-askpass +=============== + +An Aqua_-based passphrase dialogue for use not only with OpenSSh_. + +``mac-ssh-askpass`` asks for a passphrase on macOS, using the graphical +user interface. It conforms to the so-called `SSh Askpass Protocol`_. + +I wrote this because I was looking for something simple, +but couldn't find anything. + + +.. _Aqua: https://en.wikipedia.org/wiki/Aqua_(user_interface) + +.. _OpenSSh: https://www.openssh.com/ + +.. _`SSh Askpass Protocol`: https://man.openbsd.org/ssh-add + + +Synopsis +======== + +``SSH_ASKPASS=mac-ssh-askpass ssh-add + +Then copy ``mac-ssh-askpass`` to a directory in your ``PATH``, +*/usr/local/bin* is a good choice, and make it executable. + +You can do this by saying:: + + curl https://codeload.github.com/odkr/mac-ssh-askpass/tar.gz/v1.0.0 | + tar -xz + # Check the source! + more mac-ssh-askpass-1.0.0/mac-ssh-askpass + # If -- and only if -- you like what you see, continue by: + sudo mkdir -pm 0755 /usr/local/bin + sudo cp mac-ssh-askpass-1.0.0/mac-ssh-askpass /usr/local/bin + +There isn't much of a point in keeping the repository around, +so you may then wish to say:: + + rm -rf mac-ssh-askpass-1.0.0 + + +Documentation +============= + +Use the source. + + +Contact +======= + +If there's something wrong with ``mac-ssh-askpass``, `open an issue +`_. + + +Legal +===== + +This is free software released into the public domain. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +Further Information +=================== + +GitHub: + diff --git a/mac-ssh-askpass b/mac-ssh-askpass new file mode 100755 index 0000000..557377d --- /dev/null +++ b/mac-ssh-askpass @@ -0,0 +1,27 @@ +#!/bin/sh +# mac-ssh-askpass v1.0.0 - Asks for passphrases in the GUI on macOS. +# Odin Kroeger, 2018 +# +# This is free software released into the public domain. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. + +CPID=$PPID +CCOMM=$(ps -o comm=, $CPID) + +exec osascript - "$@" <