mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-14 02:02:29 +00:00
14 lines
246 B
Bash
14 lines
246 B
Bash
#!/bin/bash
|
|
|
|
TIMEOUT="1h"
|
|
NAME=$1
|
|
|
|
if [ -z "$NAME" ]; then
|
|
ssh-add -L
|
|
else
|
|
if [ -f "~/.ssh/id_ed25519_${NAME}" ]; then
|
|
ssh-add -t $TIMEOUT "~/.ssh/id_ed25519_${NAME}"
|
|
else
|
|
echo "No key named ${NAME} found..."
|
|
fi
|
|
fi |