aboutsummaryrefslogtreecommitdiff
path: root/kvmx-create
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-03-31 15:02:54 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-03-31 15:02:54 -0300
commit6a6761edcd2dba730e685b2bf0ffe40be690f421 (patch)
tree3a3c827235bfb56f02d69859042ebf2c33b60fd3 /kvmx-create
parent3b606e398e0ae95708be37e015d6d5fd0ff6ad0c (diff)
downloadkvmx-6a6761edcd2dba730e685b2bf0ffe40be690f421.tar.gz
kvmx-6a6761edcd2dba730e685b2bf0ffe40be690f421.tar.bz2
Fix SSH keypair file names on kvmx-create
Diffstat (limited to 'kvmx-create')
-rwxr-xr-xkvmx-create4
1 files changed, 2 insertions, 2 deletions
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