If the program is ssh2, the reason may be that the
ssh2 client does not work if su is used before
establishing the Secure Shell connection. The error output depends on
the terminal used and what kind of an su is made before the
ssh2 connection attempt. ssh2 does not need to be
program-controlled, instead avoid using su before starting
ssh2.