mirror of
https://github.com/anatolykopyl/sshukh.git
synced 2026-03-26 12:55:02 +00:00
Fixed critical issue where in some cases there was no output
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user