Add ssh-switch script

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2019-06-25 11:31:44 +02:00
parent 908f0f7b67
commit 90993096e7
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4

16
system/.local/bin/ssh-switch Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
#
# SCRIPT NAME:
# ssh-switch
#
# AUTHOR:
# Severin Kaderli <severin@kaderli.dev>
#
# DESCRIPTION:
# Switches the current SSH Key
#
# USAGE:
# ./ssh-switch KEY
cp -a "${HOME}/.ssh/${1}" "${HOME}/.ssh/id_rsa"
cp -a "${HOME}/.ssh/${1}.pub" "${HOME}/.ssh/id_rsa.pub"