diff options
-rwxr-xr-x | kvmx-create | 4 |
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 |