diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 18:09:53 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2018-06-13 18:09:53 -0300 |
commit | 72827921d99f35686602ef8eb6ee56eaa6824b23 (patch) | |
tree | 8d59bfa8f66536b1df09b40caef0fd46bf99450a | |
parent | b8b05773c2b51fdc67fdf57a3eec34923e2c67ea (diff) | |
download | kvmx-72827921d99f35686602ef8eb6ee56eaa6824b23.tar.gz kvmx-72827921d99f35686602ef8eb6ee56eaa6824b23.tar.bz2 |
Make argument optional at __kvmx_ssh_command
-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" } |