If the program is sshg3, the reason may be that the sshg3 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 sshg3 connection attempt. sshg3 does not need to be program-controlled, instead avoid using su before starting sshg3.
What to read next:
Reduce Secure Shell risk. Get to know the NIST 7966.
The NISTIR 7966 guideline from the Computer Security Division of NIST is a direct call to action for organizations regardless of industry and is a mandate for the US Federal government. Download now
ISACA Practitioner Guide for SSH
With contributions from practitioners, specialists and SSH.COM experts, the ISACA “SSH: Practitioner Considerations” guide is vital best practice from the compliance and audit community. Download now