Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rexec on RS6K

Status
Not open for further replies.

kathi

Programmer
Jun 17, 2002
9
GB
Possibly a dumb question...

From a W2K server I can use rexec to perform commands such as date and who on a RS6K, however I really need to execute a script on the RS and get the output to go to a file that I can then ftp back from the RS.

Additionally I can't seem to find how to include the password in the rexec command line.

All help appreciated...
 
kathi

On most systems you can use a .netrc file to supply the username and password for rexec (and ftp) commands but as far as I can work out rexec on W2K doesn't support this.

The way to do what you want is to install Expect on the W2K box then write an Expect script to launch the rexec command with an -l parameter specifying the username and supply the password via Expect.

You understand that the script you wish to run must be resident on the R6K box, the output lines in that script should redirect their output to a file on the R6K which you can then FTP back (again using Expect to automate the login process).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top