We run Nagios to monitor our servers and services. While I was setting up a new server to be monitored via 'check_by_ssh', I kept getting an error "Remote command execution failed: stdin: is not a tty". I could ssh into the server just fine with the nagios user and execute the remote command manually, however, it would not run using the 'check_by_ssh' command. I finanly found my problem.