Copyright: ® FTP Software, Inc. 1997. All rights reserved.
Citation: ® Copyright FTP Software, Inc. 1997. All rights reserved.


Remote Command Contents
Remote Command Help Contents

Overview

Step-by-Step Instructions

Concepts

Getting Technical Assistance


Step-by-Step Instructions

Managing Sessions

Define a New Session

Delete a Session

Open a Session

Save an Open Session

Save an Open Session with a New Name

Preparing to Use Remote Command

Use Passwords

Executing Commands on a Remote Host

Execute Commands

List Files on a Remote Host

List the Contents of a File on a Remote Host

Exit from Remote Command Immediately After Executing a Command

Printing Remote Files

Print Remote Files on Local Printers

Print Remote Files on Remote Printers

Saving Results of Command Output

Send Command Output to the Clipboard

Send Command Results to a File


Concepts

A Remote Command Command Line

Convert Between UNIX and PC Formats

What is a Session?

Commands

The Authentication Menu

The Edit Menu

The Session Menu

The Settings Menu

The Toolbar


Remote Command
Introducing Remote Command

What is Remote Command?

Getting Started


What is Remote Command?

Remote Command is a tool you can use to execute commands over the network from your local PC (an rsh client) without actually logging in to the remote host. The remote host must support access by remote rsh clients.

Features of Remote Command enable you to

•	Specify the type of authentication method to use when you connect to the remote host:

•	Observe the results of the command execution, any errors that occurred, and the status of the command.

•	Save the results of the command execution to a local file or to the Windows Clipboard. For example, you can request a directory listing of files on the remote host and then save the directory listing to a local file on your PC.

Related Topics

Getting Started

What is a Session?


Remote Command

Use the Remote Command dialog box to execute commands over the network from your local PC (an rsh client) without actually logging in to the remote host. The remote host must support access by remote rsh clients.

Dialog Box Items

Username

Hostname

Command

Start/Stop

Output

Progress Details window

Related Topics

Execute Commands

What is a Session?


Getting Started

Before you start using Remote Command, be sure that

•	You know the hostname or Internet Protocol (IP) address of the remote host on which you want to execute commands.

•	The appropriate account information (for example, username and password) is established for you on that host. You need this login information when you make a connection to that remote host for Remote Command operations that use authentication.

•	On UNIX hosts, you can examine the /etc/hosts and /etc/hosts.equiv files to be sure your host is listed. (Other types of hosts may have different files to verify access permission.) If you have any questions about this procedure, or about your account on a remote host, contact your network or system administrator.

•	You have permission to access the files that you want. On remote UNIX systems, you can examine the file permissions if you are uncertain about them, using the UNIX ls -l command with Remote Command or a similar utility.

•	You are familiar with file naming conventions, case sensitivity rules, and wildcard syntax on the remote host and your PC.


What is a Session
What is a Session?

Remote Command lets you save a command, the hostname, and your authentication information in a session definition that the application can use for future connections.

You can save multiple session definitions and then, when you start Remote Command, load which session you want to use.

To open an existing session, from the Session menu, choose Load.

To define new remote host connections, type your username, the hostname or the remote computer, and the command. Then, from the Session menu, choose Save As and type a name that describes the session.

You can use Windows to create one or more customized Remote Command icons that you can use to connect to a remote hosts automatically when you double-click the appropriate FTP icon.

Note:  Remote Command session definitions are stored in the PCTCP.INI file.

Related Topics

Define a New Session

Getting Started

Opening a Session

Saving an Open Session

Saving an Open Session with a New Name

The Session Menu


Exit from Remote Command Immediately After Executing a Command

From the Settings menu, click Exit After Executing Command.

A check mark indicates this option is active.

Related Topics

A Remote Command Command Line


Defining a New Session
Define a New Session

1.	Start Remote Command.

2.	Type your username, as recognized by the remote computer; the hostname of the remote computer; and the command to execute on the remote computer.

3.	From the Session menu, select Save As.

4.	In the Save Session As dialog box, type an easily recognized name for the session.

5.	Choose OK.

Related Topics

What is a Session?


Deleting a Session
Delete a Session

1.	From the Session menu, select Delete.

2.	In the Delete Session dialog box, select a session.

3.	Choose OK.

Related Topics

What is a Session?


Opening a Session
Open a Session

1.	From the Session menu, select Load.

2.	In the Load Session dialog box, select a session.

3.	Choose OK.

Related Topics

A Remote Command Command Line

What is a Session?


Saving an Open Session
Save an Open Session

1.	From the Session menu, select Save or Save as.

2.	If you are creating a new session, or if you selected Save as, in the Save Session As dialog box, type an easily recognized name for the session.

3.	Choose OK.

Related Topics

Saving an Open Session with a New Name

What is a Session?


Saving an Open Session with a New Name
Save an Open Session with a New Name

1.	From the Session menu, select Save as.

2.	In the Save Session As dialog box, type an easily recognized name for the session.

3.	Choose OK.

Related Topics

Saving an Open Session

What is a Session?


A Remote Command Command Line

You can start Remote Command by specifying wrsh.exe on a command line.

This is useful when you want to

•	Create customized Remote Command icons that you can click to automatically connect to a remote host using an existing Remote Command session definition.

•	Use the Run command from the File menu in Program Manager or File Manager or from the DOS command line.

•	Use the application from a Visual Basic or C++ application, using WinExec().

To start Remote Command from a command line, type a command with the following format:

wrsh [-s sessionname]

-or-

wrsh [-l username -h hostname -p password -e -c f outputfile command]

where

-s sessionname	Specifies to use the session defined in sessionname.

-l username 	Specifies the username as recognized by the remote computer.

-h hostname 	Specifies the hostname of the remote computer.

-p password 	Specifies the password used by username on the remote computer.

-e	Specifies that Remote Command exits after executing the command.

-c	Specifies that Remote Command pastes the output of the command on  the Windows clipboard.

-f outputfile	Specifies a file in which to save the output of the command.

command	Specifies the command to execute on the remote computer. This command must follow the syntax of the remote computer.


Using Passwords
Use Passwords

You can configure Remote Command to authenticate you or your computer with the remote computer in one of the following ways:

•	Do not prompt you for a password. This method uses the Rsh protocol, in which authentication is based on the list of hosts that is maintained on the remote computer; if your computer is listed, you can execute the command.

•	Prompt you for a password. This method uses the Rexec protocol for user verification, in which authentication is based on a list of users and passwords that is maintained on the remote computer.

•	Try the Rsh protocol first. If that does not work, try a second time with the Rexec protocol.

The correct authentication method might differ between remote computers. You might need to consult your system administrator about which authentication method to use for each computer.

Set the authentication method from either the Authentication menu or the toolbar.

Related Topics

The Authentication Menu

The Toolbar


Execute Commands

1.	Choose the authentication method from either the Authentication menu or the toolbar.

2.	In the Username box, type the username required on the remote host.

3.	In the Hostname box, type the remote hostname.

4.	In the Command box, type the command you want to execute on the remote host.

5.	Choose Start.

If a password is required, the Remote Command Password dialog box appears. Type the password for the remote host, and choose OK.

The Start button changes to Stop. Choose Stop at any time to cancel the operation in progress. When the process is fully executed, the button changes back to Start.

The Output box displays any output from the execution of the command.

Related Topics

Save Command Results

Using Passwords


Remote Command Password

Type the password you use on the remote host, and choose OK.

Dialog Box Items

Username

Hostname

Password


List Files on a Remote Host

In the Command box, type the ls (List Files) command:

ls directory

For example, to display a directory listing of the files in your login directory, type:

ls

To display a list of files a different directory, specify the directory path. For example, if the XYZ directory resides in your login directory:

ls xyw

For complete details about ls command options, refer to your UNIX documentation.

Related Topics

Execute Commands

List the Contents of a File on a Remote Host


List the Contents of a File on a Remote Host

In the Command box, type the cat (Concatenate Files) command:

cat file

For example, to list the contents of the file named remote.txt in your login directory:

cat remote.txt

For complete details about cat command options, refer to your UNIX documentation.

Related Topics

Execute Commands

List Files on a Remote Host


Send Command Results to a File

1.	From the Settings menu, choose Send Results To.

2.	Select File on the pull-right menu.

3.	In the Open Output File dialog box, specify the name of the file in which you want to save the command results, as well as the file location (directory and drive).

4.	Choose OK.

5.	Execute the command in the Remote Command dialog box.

When the process is complete, the data that appears in the Output box is saved to the file you specified.

Related Topics

Execute Commands

A Remote Command Command Line


Send Command Output to the Clipboard

1.	From the Settings menu, choose Send Results To.

2.	Select Clipboard on the pull-right menu.

3.	Execute the command in the Remote Command dialog box.

When the process is complete, the data that appears in the Output box is saved to the Windows Clipboard.

Related Topics

Execute Commands

A Remote Command Command Line


Print Remote Files on Local Printers

1.	From the Authentication menu, choose Do Not Request a Password.

--or--

From the toolbar, select the Rsh button.

2.	In the Command box, type the following cat (Concatenate Files) command to print a remote file on the local printer:

cat file;lp

For example, to print the remote file named myfile:

cat myfile;lp

For complete details about cat and lp command options, refer to your UNIX documentation.

Related Topics

Execute Commands

Print Remote Files on Remote Printers


Print Remote Files on Remote Printers

1.	From the Authentication menu, choose Do Not Request a Password.

--or--

From the toolbar, select the Rsh button.

2.	In the Command box, type the following lp (Print) command to print a remote file on the remote printer:

lp file

For example, to print the remote file named myfile:

lp myfile

For complete details about lp command options, refer to your UNIX documentation.

Related Topics

Execute Commands

Print Remote Files on Local Printers


Disable End-of-Notation Conversion

From the Settings menu, choose the Converting UNIX/PC option.

If a checkmark appears next to the option, the option is enabled. If there is no checkmark, the option is disabled.

Related Topics

Convert Between UNIX and PC Formats


Convert Between UNIX and PC Formats

Remote Command can execute many UNIX commands or scripts. By default, Remote Command assumes that the output of the remote command is in ASCII format and, therefore, converts the UNIX end-of-line notation to a PC end-of-line notation.

If you expect the output to be in binary form, you do not want to perform this conversion. If you do the conversion in this case, it introduces extra characters into the results.

The Remote Command application provides a Settings menu option to disable the conversion: the Converting UNIX/PC option. When selected, conversion is disabled. Adjustments for the end-of-line notation are automatically made.

Related Topics

Disable End-of-Notation Conversion


Save Command Results

When you use Remote Command, you can send the results of the command's execution to a file that you specify or to the clipboard, or to both simultaneously. Use the Settings menu to indicate where you want to send the results.

Each time you choose the Start button when you are saving results to a file, the previous results are lost.

Related Topics

A Remote Command Command Line

Send Command Output to the Clipboard

Send Command Results to a File


View the Results of Running a Command

Use the Output window to view the results of running a command. When a command executes, the results of the progress displays in the Output window. Errors resulting from the execution display as they occur in a message box.


The Session Menu

Use the Session menu to execute commands on remote hosts when the commands have been saved in a session file and to save commands in session files.

Use this command	To do this
Load	Select a session from a list. Remote Command loads the hostname and  command, defined by the session, into the dialog box. You then choose START to execute the command. The name of the currently loaded session appears in the title bar of the Remote Command dialog box.
Save	Save the current hostname and command in a session file. If you have already loaded a session file, Remote Command saves the current information in the same file. If you have not loaded a session file, Remote Command prompts you to specify a filename.
Save as	Save the current hostname and command in a session file. Remote Command prompts you to specify a filename.
Delete	Open a dialog box with a list of session names. You select the sessions you want to remove and click OK to remove them from the session list.
Exit	Exit from the Remote Command application.


The Authentication Menu

Use the Authentication menu to choose the type of authentication method you want to use when you connect to the remote host.

Use this command	To do this
Use Default Authentication Order	Try without a password first. If that does not work, try a second time with a password.
Request a Password	Use the Rexec protocol for user verification.
Do Not Request a Password	Use the Rsh protocol for user verification.
You can also use the toolbar buttons to choose the authentication method.

Related Topics

The Tool Bar


The Toolbar

The toolbar gives you quick access to commands.

Use this button	To do this
	Try without a password; if not successful, request a password (use default authentication order)
	Do not request a password (use the Rsh protocol)
	Request a password (use the Rexec protocol)
	Exit the Remote Command application
Use the Settings menu to alternate between viewing and hiding the toolbar.


The Settings Menu

Use the Settings menu to customize Remote Command operations. A checkmark next to the entry indicates that it is active.

Use this command	To do this
Display Icon Bar	Display the buttons on the toolbar.
Display Status Bar	Display the status of a command on the status bar.
Send Results To	Save the results of a command execution in a file or on the clipboard.
Output is Binary	Specify binary output.
Clear Output Screen	Delete information from the output box before executing a new command.
Show Progress Details	Display the progress of a commands execution.
Save Settings on Exit	Save the settings you have chosen under the Settings menu when you exit. These same settings will be set when you use Remote Command again.
Exit after Executing Command	Close the application after executing the command defined by the session. This setting is especially useful when Remote Command is being called from another program.


The Edit Menu

Use the Edit menu to copy, cut and paste information that appears in the Output box.

Use this command	To do this

Select All	Select all information.

Copy	Copy information.

Cut	Cut text from the information displayed.

Paste	Paste the text cut or copied so that it displays again, possibly in another location.


authentication method: A communications protocol that sets up authentication for the connection between your PC and the remote host.

With Remote Command, choose one of the following:

•	Do not prompt you for a password. This method uses the Rsh protocol, in which authentication is based on the list of hosts that is maintained on the remote computer; if your computer is listed, you can execute the command.

•	Prompt you for a password. This method uses the Rexec protocol for user verification, in which authentication is based on a list of users and passwords that is maintained on the remote computer.

•	Default: Try the Rsh protocol first. If that does not work, try a second time with the Rexec protocol.


ASCII: An acronym for American Standard Code for Information Interchange and their standard computer character set used to encode text files.

A file transfer mode for a text file. ASCII mode ensures that the file is interpreted correctly by the destination system.


binary: A transfer mode for a file that contains both data and programming instructions; for example, a file that contains a compiled program. Binary mode can also be used for ASCII (text) files.


Authentication menu: Allows you to determine which authentication protocol to use. You have a choice among default, Rsh, and Rexec protocols.


file permissions: Determine whether you can read (r), write (w), or execute (x) a file.


protocol: A formal description of message formats and the rules that two or more machines must follow to exchange those messages.


Rexec: A type of authentication protocol that requires a password when you connect to a remote host.


Rsh: A type of authentication protocol that does not require a password when you connect to a remote host.


output screen: Displays the results of command execution.


hostname: The name assigned to the IP address of the remote host. You can identify the host by its name or by its IP address.


wildcard: One or more special characters that specify multiple files. For example, myfile.* on a PC matches myfile.exe, myfile.ini, myfile.bat, etc. UNIX wildcards are more powerful and more complex. Refer to your UNIX documentation for complete details about UNIX wildcards.


Enter the username required for login on the target system. Many ftp sites accept public logins using the username "anonymous".


Enter the password required for login on the target system. Sites that accept the username "anonymous" often require you to provide your email address as the password.


Enter the account (if any) required for login on the target system. Leave this field blank if no account is required.


Enter the command you want to execute on the remote host.


Displays the output from commands or programs that are executing on the remote system.


Display Help about the contents of this dialog box.


Displays progress, error, and program debugging messages from the remote system. You turn this display area on and off by choosing Show Progress Details from the Settings menu.


account name: The name or word that identifes who is billed for this session on a computer system.


case sensitivity: The ability of a program to evalutate the difference between the capitalized and non-capitalized versions of a character. Case sensitive programs treat for example, cat and Cat, as distinct items.

It matters how you enter file and variable names on a case sensitive operating system (such as the UNIX operating system). If you want to view a file named Cat, and you enter the characters cat,  the system displays the file named cat if one exists, or gives you an error message. It does not display a file named Cat. Case sensitivity also effects the way that files are listed when sorted in alphabetical order.

.


filename conventions: A TCP/IP network usually contains computers that run different operating systems. Each operating system has different conventions for naming files. For example, both the number and kinds of characters that can be used in a name are often subject to limits.

When you use some TCP/IP supported services such as telnet and ftp, use the filenaming conventions in effect on the host system to work with files that are on the host.


hostname: The name of a networked computer.

The hostname is one form of the computers TCP/IP network address; the other is its complete numeric network address.You can access a computer by its hostname or its numeric network address.


toolbar: A group of buttons that appears below the menu bar. These buttons let you gain access quickly to the application's features.


IP address: A number (in the form n.n.n.n  where each n is a value in the range 0 to 255) that uniquely identifies a networked computer that uses the TCP/IP communication protocol. (The Internet Protocol is defined in RFC 791.)


MIB-II: The Management Information Base (MIB) database used by an SNMP MIB agent to store information about the network operations of your PC. MIB-II (or MIB version 2) is the second version of the Internet-standard MIB. RFC 1213 defines the format of MIB-II.


packet: A single network message with its associated header, addressing information, data, and optional trailer. Also known as a "frame" or "datagram".


password: A word or string of characters that you supply in order to login to another system on a network. Systems that accept the username "anonymous" often require you to provide your e-mail address as the password.


permissions: On UNIX systems, settings that control who has access to a file and what rights (read, write, or execute) are given. NFS uses UNIX-style permissions to control access to network files.


protocol window: Some OnNet applications support a window dedicated to displaying the interactions between your PC and the remote host (the protocol). You can display the window usually from a View, Settings, or Options menu.


remote host: A networked computer that makes a service available to other computers on the network. Typical host services include transferring files, printing files, and managing logins from remote users.


SNMP community: A relationship between an SNMP agent and one or more SNMP management stations.


SNMP community name: A unique name shared by the members of an SNMP community.


SNMP message: A packet of data, consisting of an SNMP community name and SNMP commands and operands.


status bar: A message area, typically at the bottom of the application window, that provides information about the component that is currently selected, or the state of the application.


session: A session comprises the interactions between your PC and a remote host  beginning with the initial connection and ending when you or the host explicitly disconnect.

Some OnNet applications allow you to configure sessions, that is, automatically send parameters such as your username and password to the remote host..


session definition: The configuration settings for a particular session or host connection. A session definition might include such settings as the hostname of a computer on the network and your login name for that computer, as well as other values that you specify. The set of session parameters you can specify differs with each program.


TCP (Transmission Control Protocol): A Transport layer, connection-oriented, end-to-end protocol that provides reliable, sequenced, and nonduplicated delivery of bytes to a remote or a local user. TCP provides reliable byte stream communication between pairs of processes in hosts attached to interconnected networks.


time out: A period of time when a connection between a PC and a  host computer is allowed to be idle or unused, or when a PC can attempt to make a connection to a networked host..

When the time period elapses, the host closes the idle connection, or the PC reports that it failed to connect to a host.


UDP (User Datagram Protocol): A Transport layer, connection-less mode protocol providing a (potentially unreliable, unsequenced, and/or duplicated) datagram communication for delivery of packets to a remote or a local user. UDP provides a procedure for a process to send messages to other processes with a minimum of protocol mechanism.


username: A name required for login to a remote system.


wildcard:  A character such as * or ? that represents one or more characters in a filename. In a network, each operating system supports its own wildcard characters and syntax. When you use wildcards on a remote host, follow the conventions that apply to that host.


Displays or hides additional elements of this dialog box.


Returns to the previous dialog box.


Displays the Open dialog box so that you can search for a specific file.


Cancels your selection(s) and close the dialog box without taking any action.


Closes the dialog box.


Exits the application.


Displays Help about the contents of this dialog box.


Does not proceed as indicated.


Proceeds to the next dialog box.


Confirms your selection(s) and close the dialog box.


Opens the Options dialog box.


Enter a word or string of characters to log in to another system, workgroup, or domain on a network.


Protects the contents of the file from modification.


Starts the operation.


Stops the operation.


Starts or stops the operation.


Enter the hostname or IP address of the remote host that you are trying to reach.


Enter the name that you use to log in to a computer on a network.


Proceeds as indicated.


Proceeds as indicated and avoids further prompts for confirmation.


Click this to set up options,


Saves all the changes you have made without closing the dialog box.


Context-sensitive help for this item is not yet implemented.


Help for this dialog box is not yet implemented.


Technical assistance

Users in the U.S. and Canada, and worldwide resellers  Contact FTP Software®:

Telephone:	(800) 382-4387

(508) 685-3600

E-mail:	support@ftp.com

Fax:	(508) 794-4484

 or

Users outside of the U.S. and Canada  Contact your local reseller.

Tip

For FREE online technical services, see:

World Wide Web:	http://www.ftp.com

Anonymous Ftp Server:	ftp.ftp.com

Bulletin Board System:	(508) 684-6240 ( settings  8,N,1)

CompuServe:	GO FTPSOFT (PCVENJ Section 8)