diff options
Diffstat (limited to 'kvmx')
-rwxr-xr-x | kvmx | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -181,11 +181,13 @@ function __kvmx_initialize { MONITORFILE="$STATE_DIR/monitor" CONSOLEFILE="$STATE_DIR/console" - if [ -e "$DATADIR/ssh/$VM.key" ]; then - mkdir -p "$DATADIR/ssh" - SSHKEY="$DATADIR/ssh/$VM.key" - else - SSHKEY="$APP_BASE/share/ssh/insecure_private_key" + if [ -z "$ssh_custom_pubkey" ]; then + if [ -e "$DATADIR/ssh/$VM.key" ]; then + mkdir -p "$DATADIR/ssh" + SSHKEY="$DATADIR/ssh/$VM.key" + else + SSHKEY="$APP_BASE/share/ssh/insecure_private_key" + fi fi if [ ! -z "$user" ]; then |