-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 98da80c
Showing
3 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <http://unlicense.org> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 </dev/null`` | ||
|
||
|
||
Getting ``mac-ssh-askpass`` | ||
=========================== | ||
|
||
Disclaimer | ||
---------- | ||
|
||
You use ``mac-ssh-askpass`` **at your own risk**. You have been warned. | ||
|
||
|
||
Download and Installation | ||
------------------------- | ||
|
||
``mac-ssh-askpass`` is a simple AppleScript. | ||
It should work on any version on any version of macOS. | ||
|
||
Download the repository from: | ||
<https://codeload.github.com/odkr/mac-ssh-askpass/tar.gz/v1.0.0> | ||
|
||
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 | ||
<https://github.com/odkr/mac-ssh-askpass/issues>`_. | ||
|
||
|
||
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: | ||
<https://github.com/odkr/mac-ssh-askpass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 - "$@" <<EOF | ||
on run argv | ||
set text item delimiters to " " | ||
set prompt to argv as text | ||
set reply to display dialog prompt ¬ | ||
default answer "" with title "$CCOMM ($CPID)" with hidden answer | ||
set pass to text returned of reply | ||
return pass | ||
end run | ||
EOF |