11.06.2014 Views

Cross-platform TCP/IP Socket programming in REXX Contents

Cross-platform TCP/IP Socket programming in REXX Contents

Cross-platform TCP/IP Socket programming in REXX Contents

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Cross</strong>-<strong>platform</strong> <strong>TCP</strong>/<strong>IP</strong> <strong>Socket</strong> Programm<strong>in</strong>g <strong>in</strong> <strong>REXX</strong><br />

●<br />

The telnet Command<br />

Telnet Access<br />

● The telnet client is a <strong>TCP</strong>/<strong>IP</strong> utility that enables<br />

term<strong>in</strong>al access<br />

● telnet is normally <strong>in</strong>voked from the command l<strong>in</strong>e <strong>in</strong><br />

the format:<br />

$ telnet hostid<br />

●<br />

●<br />

telnet also supports an <strong>in</strong>teractive mode<br />

Upon connection you will be prompted for Userid and<br />

Password<br />

13<br />

●<br />

●<br />

<strong>TCP</strong>/<strong>IP</strong> Applications: rsh, rexec<br />

rsh - Remote Shell<br />

● Permits you to issue a command on another mach<strong>in</strong>e and<br />

receive the response<br />

● Send<strong>in</strong>g host, userid must be pre-authorized<br />

● .rhosts file conta<strong>in</strong>s permitted mach<strong>in</strong>es, usernames<br />

● Userid and cmd text traverses network, but not passwd<br />

$ rsh rexxdog ls -al<br />

rexec - Remote Execution<br />

● Issue a command on remote host & receive response<br />

● Userid, password, and cmd text traverses the network<br />

$ rexec -l bstark -p pswd rexxdog ls -al<br />

● Userid and password from .netrc file <strong>in</strong> home directory<br />

mach<strong>in</strong>e rexxdog log<strong>in</strong> bstark password pswd<br />

$ chmod go-rwx .netrc (Remove others access)<br />

14<br />

7<br />

updated 17-Aprr-2005 Copyright © 2005 ProTech Professional Technical Services, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!