diff options
-rwxr-xr-x | kvmx | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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" } |