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 () {
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user