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