diff --git a/default/home/.local/bin/ssh-agent-handler.sh b/default/home/.local/bin/ssh-agent-handler.sh new file mode 100755 index 0000000..e8bd755 --- /dev/null +++ b/default/home/.local/bin/ssh-agent-handler.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +if [[ -z ${1} ]];then + echo "no host provided" + exit 1 +fi +host="${1}" +if [[ -z ${2} ]];then + echo "no icon provided" + exit 1 +fi +icon="${2}" + +echo "${host}" +echo "${host#*@}" +#exit 0 + +alacritty -T "${icon} ${host#*@}" -e bash -c '\ +eval $(ssh-agent) &> /dev/null; \ +ssh-add ~/.ssh/id_ed25519 &> /dev/null; \ +ssh -A '"${host}" diff --git a/default/include b/default/include index 82d1e38..a38bb1e 100644 --- a/default/include +++ b/default/include @@ -13,3 +13,4 @@ Scripts/iso_updater.sh .config/fastfetch/config.jsonc Scripts/fix-swap-part.sh .local/bin/serverutil-deb-upload +.local/bin/ssh-agent-handler.sh