What do you want rlogin to do? Do you want to execute test1.env and test1.sh on the remote host? If so it's not the way to do it. rlogin just waits for input from stdin, it's interactive program.
I believe you need remsh or if you have ssh use ssh.
If I understood you right, on the remote box you must create .rhosts file in the user home directory and write there the ip and the user that can execute the commands, then you can use remsh without getting adked about password.
For example, you have two hosts:
111.111.111.111
111.111.111.222
you want user alex to execute scripts on the remote box with user danny.
Login into remote box and in the home directory of danny create file .rhosts and put in it:
111.111.111.111 alex
Now on 111.111.111.111 you can do:
remsh -l danny 111.111.111.222 "ls -l /tmp"
(usage: remsh -l
)
For more details you can man remsh.
But I suggest to use ssh. Easier and secure.
I don't give a damn for a man that can only spell a word one way. (M. Twain)