Fixed critical issue where in some cases there was no output

This commit is contained in:
2021-04-10 02:06:13 +03:00
parent 91db04d424
commit 0359c97ce9

View File

@@ -14,8 +14,7 @@
# ------------------------------------------------------------------------------
sshukh () {
output=$(\ssh "$@" 2>&1)
echo $output
output=$(\ssh "$@" 2>&1 | tee /dev/tty)
error=$(echo $output | tail -1)
if [[ "$error" == "Host key verification failed."* ]]; then
host=$(cut -d'@' -f2 <<< $1)