diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-04-01 22:42:30 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-04-01 22:42:30 -0300 |
commit | bccc6e33d394ce12ce89195a3eb0c73c6e2f797a (patch) | |
tree | e3047d148d8a17f7a329e3974ad76d4998d9ca17 /lib | |
parent | b2e96fae1957229fb63649122023f5e0c3d3332a (diff) | |
download | kvmx-bccc6e33d394ce12ce89195a3eb0c73c6e2f797a.tar.gz kvmx-bccc6e33d394ce12ce89195a3eb0c73c6e2f797a.tar.bz2 |
Ensure any previous keys are removed at __kvmx_ssh_keygen
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/kvmx/functions | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/kvmx/functions b/lib/kvmx/functions index df1bd7a..134f4be 100755 --- a/lib/kvmx/functions +++ b/lib/kvmx/functions @@ -12,6 +12,10 @@ # Generate a keypair function __kvmx_ssh_keygen { if [ ! -z "$2" ]; then + # Ensure any previous keys are removed + rm -f $1 $1.pub + + # Generate the keypair ssh-keygen -t rsa -b 4096 -f $1 -N '' -C $2 fi } |