vaporup / ssh-tools

Making SSH more convenient
GNU General Public License v3.0
889 stars 27 forks source link

[FR] ssh-ping exit code #12

Closed gustaphe closed 2 years ago

gustaphe commented 3 years ago

It would be really nice if ssh-ping exited non-zero when all packets lost, like ping does.

That way you can do

if ssh-ping -c1 -W3 host &>/dev/null
then
    something
fi

Right now, the condition is always true.

vaporup commented 3 years ago

The current version in master should do what you want. Maybe it is time to do a new release :-)

gustaphe commented 3 years ago

My bad, I forgot to check which version I was on. Rookie mistake.

I'm installing though pacman, so a release would be nice.

(Thanks for a sweet piece of software)

vaporup commented 2 years ago

https://github.com/vaporup/ssh-tools/releases/tag/v1.7