Compare commits

...

3 Commits

Author SHA1 Message Date
624e8d2bfd
remove suggested username from ssh FAQ 2025-03-25 20:32:16 +01:00
c8282c82c5
Merge branch 'master' of ssh://gitea.dmz.rs:2222/Decentrala/dmzconf 2025-03-22 12:21:02 +01:00
e44620521f
remove old showpass script
The dmzadmin repo now populates password lists, no need for this.
2025-03-20 18:58:48 +01:00
2 changed files with 0 additions and 63 deletions

View File

@ -1,62 +0,0 @@
#!/bin/sh
# If you want to add these passwords to the `pass` program, you can
# symlink all the passwords which you can open, then open the
# passwords with a script like this.
pass_store=~/.password-store
# THIS_PLACE="$PWD"
# mkdir $pass_store/dmz
# cd !$
# find "$THIS_PLACE" -type f -name "*.gpg" | \
# sed "s#/home/ghost#../..#" | \
# while read -r line; do
# gpg -d "$line" && ln -sf "$line" .
# done
sanity_check(){
command -v $1 >/dev/null || (
echo "You must install $1"
exit 1
)
}
set_selector_if_program_exists(){
command -v "$1" > /dev/null && selector="$1 $2"
}
if [ -z "$DISPLAY" ]; then
set_selector_if_program_exists sk || \
set_selector_if_program_exists fzy || \
set_selector_if_program_exists fzf
fail_sender='echo'
else
set_selector_if_program_exists "rofi" 'rofi -dmenu "$@"' || \
set_selector_if_program_exists dmenu || \
(
echo "Cannot find anything to select a key. Install dmenu."
exit 1
)
fail_sender='notify-send'
fi
list_keys(){
find -L . -mindepth 1 -type f -name "*.gpg" | \
sed 's/\.\///' | \
sed 's/.gpg//'
}
####################
set -e
sanity_check pass
cd "$pass_store"
password="$(list_keys | $selector)"
pass -c "$password" || $fail_sender 'Cannot decrypt'

View File

@ -56,7 +56,6 @@ Now all the files have 'read, write, and execute', but only for `$USER`.
Host soft
HostName soft.dmz.rs
Port 2222
User ghost
IdentityFile ~/.ssh/id rsa
Host dmz
HostName dmz.rs