Hello everybody,
I have a program that connects to a distant machine using a specific port. Then inetd executes a command on that distant machine (M2).
What I'd like to do is write a scipt that, given the port, it gives me the command executed. (The script should be launched on the local machine M1 and should look into the /etc/inetd.conf on the machine M2).
I have a username and password on the machine M2, so when I connect using rlogin, I can view the /etc/inetd.conf without any problem.
I tryed to do an FTP on my script (machine M1), but it's not possible (permission denied).
I tryed `rsh -l login cat /etc/inetd.conf`, no way.. (I can add my user to the .rhosts, but I want a script that could be launched from anywhere).
I tryed :
rlogin M2 -l user << STOP > file.tmp
password
cat /etc/inetd.conf
STOP
But the script showes the message "Closed connection." and the "file.tmp" is empty.
Any idea ?
Thanks in advance