From: Silvio Rhatto Date: Fri, 31 Mar 2017 18:02:54 +0000 (-0300) Subject: Fix SSH keypair file names on kvmx-create X-Git-Tag: 0.1.0~495 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=6a6761edcd2dba730e685b2bf0ffe40be690f421;p=kvmx.git Fix SSH keypair file names on kvmx-create --- diff --git a/kvmx-create b/kvmx-create index 5fb2ca4..2e73f94 100755 --- a/kvmx-create +++ b/kvmx-create @@ -262,10 +262,10 @@ function kvmx_create_custom { if [ "$ssh_support" == "y" ]; then if [ "$ssh_custom" == "y" ]; then - privkey="`dirname $image`/ssh/`basename $image .img`.key" + privkey="`dirname $image`/ssh/$hostname.key" pubkey="${privkey}.pub" mkdir -p "`dirname $privkey`" - __kvmx_ssh_keygen $privkey "$user@`basename $image .img`" + __kvmx_ssh_keygen $privkey "$user@$hostname" else pubkey="$DIRNAME/share/ssh/insecure_private_key.pub" fi