aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkvmx6
1 files changed, 5 insertions, 1 deletions
diff --git a/kvmx b/kvmx
index 9575ef9..aaa3f95 100755
--- a/kvmx
+++ b/kvmx
@@ -59,8 +59,12 @@ function kvmx_app_base {
# Build a SSH command
function __kvmx_ssh_command {
+ if [ ! -z "$1" ]; then
+ local ssh_key_param="-i $1"
+ fi
+
# See http://blog.djm.net.au/2013/11/chacha20-and-poly1305-in-openssh.html
- SSH_OPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=FATAL -o ProxyCommand=none -o Ciphers=chacha20-poly1305@openssh.com -o User=$SSH_LOGIN -i $1"
+ SSH_OPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=FATAL -o ProxyCommand=none -o Ciphers=chacha20-poly1305@openssh.com -o User=$SSH_LOGIN $ssh_key_param"
SSH_COMMAND="ssh $SSH_OPTS"
SCP_COMMAND="scp $SSH_OPTS"
}