This is how I do it - highly recommend using SSH instead of R-anything. Makes
your security auditors happy.
//SFTPPRF1 EXEC PGM=BPXBATCH,PARM=('SH ssh -o $O1 -l $L $S $CMD')
//STDOUT DD SYSOUT=(,)
//STDERR DD SYSOUT=(,)
//STDENV DD *
L=userid
S=linux.whatever.com
CMD=ls -al
O1=StrictHostKeyChecking=no
/*
For this to work, you must have OpenSSH on the mainframe side. And establish
SSH keys between Unix System Services and the Linux machine. If you Google "ssh
keys" you'll find lots of sites on how to do that.
Also, check out the offering from Dovetail:
http://dovetail.com/index.html
Fancier version of doing some of the same thing.
Tom Stewart
z/OS Support Services
John Deere
-----Original Message-----
From: Linux on 390 Port [mailto:[email protected]] On Behalf Of Jones,
Russell
Sent: Friday, October 09, 2009 10:34 AM
To: [email protected]
Subject: REXEC / RSH
Does anyone have any experience running remote linux commands from MVS batch? I
have found that MVS TSO has REXEC and RSH, but I am been unsuccessful executing
a remote command on linux. I can use rexec/rsh from one linux system to
another, but not from MVS.
Any help on using these commands, or other suggestions on how to execute remote
commands will be much appreciated.
Russell Jones
ANPAC
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions, send email to
[email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390