|
From: Rob Berendt <rob@xxxxxxxxx>to
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 03/03/2016 07:19 AM
Subject: Re: [Bulk] How to execute remote commands from IBM i on to
Windows Server 2012 R2?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
Hope you don't mind that I credited you at:
https://www.ibm.com/developerworks/community/forums/html/topic?
id=61a10693-253b-48c2-a07e-91b5a10bfdf2&ps=25
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: "Kevin Adler" <kadler@xxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 03/02/2016 08:00 PM
Subject: Re: [Bulk] How to execute remote commands from IBM i on
Windows Server 2012 R2?that
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
Rob, IBM i Access for Windows 7.1 includes an rexecd service, cwbrxd,
from
is used to enable RUNRMTCMD. This service is deprecated and was not
included with the IBM i Access Client Solutions Windows Application
Package due to security issues (rexec is not secure as it passes login
information in the clear). You might be able to find a rexec service
a different vendor or you could switch to using something like SSH,which
is much more secure. You'll need ensure that 5733-SC1 product isinstalled
filesystem
on your IBM i system and install an SSH server on your Windows system
(most commonly through Cygwin:
http://www.howtogeek.com/howto/41560/how-to-get-ssh-command-line-
access-to-windows-7-using-cygwin/
). Then instead of using RUNRMTCMD you will need to call QP2SHELL or
QP2TERM, something like:
CALL PGM(QP2TERM) PARM('/QOpenSys/usr/bin/ssh' 'win2012' 'systeminfo')
kadler@win2012's password:
Host Name: win2012
OS Name: Microsoft Windows Server 2012 Standard
OS Version: 6.2.9200 N/A Build 9200
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Server
OS Build Type: Multiprocessor Free
...
Just be aware that in Cygwin, you get a Unix-like hierarchical
with Unix path separators ('/' instead of '\'), so your command:being
RUNRMTCMD CMD('dir \*.* >\tmp\diroutput.txt') RMTLOCNAME(GDSDNS *IP)
would be something like:
CALL PGM(QP2TERM) PARM('/QOpenSys/usr/bin/ssh' 'GDSDNS' 'dir' '*.*'
'>/tmp/diroutput.txt')
or
CALL PGM(QP2TERM) PARM('/QOpenSys/usr/bin/ssh' 'GDSDNS' 'dir' '*.*'
'>/cygdrive/c/tmp/diroutput.txt') /* The /cygdrive folder has all the
Windows drives (C:\, D:\, ...) underneath it) */
If you set up key-based authentication and do not set a password on the
key file, you can even log in securely to the Windows system without
etc)
prompted for a password. Here's one howto (of many to be found online):
http://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-
easy-steps/
Another benefit of using SSH is that you can use the same technique to
communicate with Linux, Mac OS X, or even other IBM i systems (or any
other OS that supports SSH), though you may have to change your command
string (not many systems outside Windows know what a dir command is,
to suit the OS you're talking to.can
One more thing. I'm not sure what you're trying to do with the
diroutput.txt, but if you're transferring that back to the IBM i, you
leverage SCP (part of SSH) to transfer it back:'GDSDNS:/tmp/diroutput.txt'
CALL PGM(QP2TERM) PARM('/QOpenSys/usr/bin/scp'
'/desired/path/to/diroutput.txt')
"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 03/02/2016
01:01:47 PM:
From: Rob Berendt <rob@xxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 03/02/2016 01:02 PM
Subject: Re: [Bulk] How to execute remote commands from IBM i on to
Windows Server 2012 R2?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
Upon further reading I'm pretty sure that Windows does not come with a
<midrange-l@xxxxxxxxxxxx>rexecd service. My pc tech, upon his own, went and loaded thedeprecated
7.1 service. We're still trying that. (He thinks he forgot to startbut
it...)
Upon starting the 7.1 deprecated service it worked. Functional is ok
I was hoping to avoid deprecated software.Windows.
rexecd = daemon for remote execution. Daemon = Unix. Service =
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1
Group Dekko
Dept 1600
Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
From: Mark S Waterbury <mark.s.waterbury@xxxxxxxxxxxxx>
To: Midrange Systems Technical Discussion
onDate: 03/02/2016 11:47 AM
Subject: Re: [Bulk] How to execute remote commands from IBM i
tonot
Windows Server 2012 R2?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>
Rob:
Type RUNRMTCMD, then press F4=Prompt, then F1=Help, then F2=Extended
Help. Read the second paragraph.
It talks about the "rexecd" daemon ... there is a Windows equivalent
that supports remote command execution, and my guess is that it is
turned off or disabled by default, and you need to ask your Windows
administrator to enable it on that Windows server.
HTH,
Mark S. Waterbury
> On 3/2/2016 11:03 AM, Rob Berendt wrote:
I've been running this command:
RUNRMTCMD CMD('dir \*.* >\tmp\diroutput.txt') RMTLOCNAME(GDSDNS *IP)
for some time now from IBM i against one of our Windows DNS servers.
We've reloaded that Windows DNS server and now remote commands are
working.
We have no interest in using the deprecated IBM i Access for Windows
andor
would rather use some Windows based tool to allow remote commands,
2012useClient
the newer IBM i Access Client Solutions.
I see no mention of remote commands in the page for IBM i Access
Solutions.
How do we add incoming remote command capability to this Windows
R2
server?
Rob Berendt
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
listlist
To post a message email: MIDRANGE-L@xxxxxxxxxxxxquestions.
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxquestions.
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.