Problem with the use of rsh

I have problem with the use of rsh . There are two computer connected together both maschine have AIX 4.3.2.0. If i use the command rsh from the command line everythings are fine also works when i used it in a csh script with the command inside . Everythings works fine as long i use standart AIX commands like "rsh remote_host date " but when i add in the remote script an executable than i got the message "Standart input is not a tty" . But if i call the script diretly on the remot host it will work

Any help on this issue are welcome

Hello,

I don't have an AIX 4.x system to hand to test with, but fundamentally this will be happening due to the fact that when a script is run remotely via rsh, rather than the script being run on a terminal or pseudo-terminal attached to a user's login session, the terminal (such as it is) is a network socket. Nowadays on Linux software such as Bash and SSH is written to take account of that sort of thing and handle it as a special case, but in AIX 4.x I doubt this was something that was handled gracefully.

Does the script you are running expect user input at the keyboard, or otherwise depend on user input ? If it doesn't, you might find that the script actually works despite the error appearing. If it does depend on user input, then you might need to re-work it to read its input from a file, transfer that file to the remote server, and then have the script read that file for its input instead.

Hope this helps !

When you do rsh remotehost command then command does not have a terminal (tty).
If the command is a shell script, then there is no problem: the shell does not need a tty. But the shell can invoke commands that want a tty.
Please find out the command in your script that issues the error message!
Sometimes the command name is prefixed in the error message like "commandx: stdin is not a tty".

If you could replace the rsh by ssh then there is a -t option that creates a pseudo terminal that will work with most commands.
ssh needs keys to be created by means of ssh-keygen.

This topic was automatically closed 300 days after the last reply. New replies are no longer allowed.