|
From QShell or PASE you can do:runs
ssh remotesystem command-to-run
The output will be written to stdout.
For example:
PGM
DLTF QTEMP/QSHOUT
MONMSG CPF2105
CRTPF QTEMP/QSHOUT RCDLEN(1000)
OVRDBF FILE(STDOUT) TOFILE(QTEMP/QSHOUT)
QSH CMD('export PATH=$PATH:/QOpenSys/usr/bin && +
ssh foo.example.com ls -l')
DLTOVR FILE(STDOUT)
ENDPGM
In this example, SSH logs on to a host named 'foo.example.com' and
the command 'ls -l' on that host. The output of that command iswritten
to stdout, which I have overridden to the QSHOUT file in QTEMP. If Iand
wanted, I could write a program that would now read that QSHOUT file
do something with the data...client can do
hockchai Lim wrote:
does anyone know how I can create a command/program that a ssh
a run remote command to get the result of the remote run? I've trid
resultcreating the command/progrm to send the result to stdout, send the
clientusing SNDPGMMSG, and even display it on a display file. But, the
can't seems to be able to see the result. Help....
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.