Skip to content

Instantly share code, notes, and snippets.

@mtovmassian
Last active October 17, 2022 09:55
Show Gist options
  • Save mtovmassian/238d5488bac78430cf7242abff3eea71 to your computer and use it in GitHub Desktop.
Save mtovmassian/238d5488bac78430cf7242abff3eea71 to your computer and use it in GitHub Desktop.
Qick ssh key adding to ssh-agent
#!/usr/bin/env bash
main() {
ssh_key_path="${1}"
if [[ -z $ssh_key_path ]]
then usage; exit
fi
ssh-add "${ssh_key_path}"
ssh-agent
}
usage() {
echo "Usage:"
echo "go-ssh-agent.sh </path/to/ssh/private/key>"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment