Not really. The only way is to actually try the connection, login, etc. By that time you may as well have tried the shell command.
I'm interested why yours hangs though... when I originally implemented this, in my tests with various servers the attempt just fails if it is unsupported.
I'll re-test this, though.