diff options
author | mail_redacted_for_web | 2022-03-21 09:36:26 +0100 |
---|---|---|
committer | mail_redacted_for_web | 2022-03-21 09:36:26 +0100 |
commit | 59d4041c607de9c2300399bd7da676218e402c9a (patch) | |
tree | 2136110c4e87ea272a7b6cc7f9f65c1a09a671ef /.bash | |
parent | effd293bbf913e35aa661efcbcfb9ff26bc2f9a4 (diff) | |
download | dotfiles-59d4041c607de9c2300399bd7da676218e402c9a.tar.bz2 |
+function for adding ssh keys
Diffstat (limited to '.bash')
-rw-r--r-- | .bash/aliases.bash | 5 | ||||
-rw-r--r-- | .bash/vars.bash | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/.bash/aliases.bash b/.bash/aliases.bash index de3d616..0086054 100644 --- a/.bash/aliases.bash +++ b/.bash/aliases.bash @@ -60,6 +60,11 @@ alias startxmonad="sxs xmonad" alias saa="source ~/.ssh/sshenv;ssh-add >/dev/null 2>&1;ssh-add -l" alias sshr='ssh -o StrictHostKeyChecking=no' alias sshk='ssh -o PasswordAuthentication=yes -o PreferredAuthentications=keyboard-interactive,password -o PubkeyAuthentication=no' +function add-sshagent-init { + for KEY in "${SSHKEYS[@]}";do + ssh-add "$i" + done +} # ----- FS ----- # xstat() { for target in "${@}";do diff --git a/.bash/vars.bash b/.bash/vars.bash index dddc831..ac56a6d 100644 --- a/.bash/vars.bash +++ b/.bash/vars.bash @@ -5,7 +5,11 @@ export BSNAME="CHANGEME" # default screenshot target. Feel free to override in .local. export SCRSHDIR="${HOME}/Pictures" -# variable for SSH environment file +# variables for SSH, override in .local: +export SSHHOME="${HOME}/.ssh" +# 1. key files, array: +SSHKEYS=( "${SSHHOME}/id_ed25519" "${SSHHOME}/id_rsa" ) +# 2. SSH environment file export SSHENVFILE="${HOME}/.ssh/sshenv" # ----- SHELL ----- # |