× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Not at all!


"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 03/03/2016
07:19:16 AM:

From: Rob Berendt <rob@xxxxxxxxx>
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
to
Windows Server 2012 R2?
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>



Rob, IBM i Access for Windows 7.1 includes an rexecd service, cwbrxd,
that

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
from
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 is
installed

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
filesystem
with Unix path separators ('/' instead of '\'), so your command:

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
being

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,
etc)
to suit the OS you're talking to.

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
can
leverage SCP (part of SSH) to transfer it back:

CALL PGM(QP2TERM) PARM('/QOpenSys/usr/bin/scp'
'GDSDNS:/tmp/diroutput.txt'

'/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

rexecd service. My pc tech, upon his own, went and loaded the
deprecated
7.1 service. We're still trying that. (He thinks he forgot to start
it...)
Upon starting the 7.1 deprecated service it worked. Functional is ok
but
I was hoping to avoid deprecated software.

rexecd = daemon for remote execution. Daemon = Unix. Service =
Windows.


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
<midrange-l@xxxxxxxxxxxx>
Date: 03/02/2016 11:47 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>



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
not
working.
We have no interest in using the deprecated IBM i Access for Windows

and
would rather use some Windows based tool to allow remote commands,
or
use
the newer IBM i Access Client Solutions.
I see no mention of remote commands in the page for IBM i Access
Client
Solutions.
How do we add incoming remote command capability to this Windows
2012
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

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
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
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.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.