From 72827921d99f35686602ef8eb6ee56eaa6824b23 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 13 Jun 2018 18:09:53 -0300 Subject: Make argument optional at __kvmx_ssh_command --- kvmx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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" } -- cgit v1.2.3