mirror of
https://github.com/5im-0n/sshenc.sh.git
synced 2025-08-06 04:40:19 +02:00
Compare commits
2 Commits
0722e8d355
...
c3467c9760
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c3467c9760 | ||
![]() |
41c8369e8d |
14
sshenc.sh
14
sshenc.sh
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
OPTIND=1 # reset in case getopts has been used previously in the shell.
|
OPTIND=1 # reset in case getopts has been used previously in the shell.
|
||||||
|
|
||||||
@@ -49,6 +49,18 @@ temp_file_key="$(mktemp "$temp_dir/$me.XXXXXX.key")"
|
|||||||
temp_file="$(mktemp "$temp_dir/$me.XXXXXX.cypher")"
|
temp_file="$(mktemp "$temp_dir/$me.XXXXXX.cypher")"
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
uname=$(uname -s 2>/dev/null)
|
||||||
|
|
||||||
|
case "${uname}x" in
|
||||||
|
Darwinx)
|
||||||
|
openssl_path=$(command -v openssl 2>/dev/null)
|
||||||
|
if [ "${openssl_path}x" = "/usr/bin/opensslx" ]; then
|
||||||
|
echo >&2 "You need openssl 1.1.1 installed and in the \$PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# retrieve ssh keys from github
|
# retrieve ssh keys from github
|
||||||
OLDMASK=$(umask)
|
OLDMASK=$(umask)
|
||||||
umask 0266
|
umask 0266
|
||||||
|
Reference in New Issue
Block a user