Using Internet Services HP 9000 Networking Edition 8 Manufacturing Part Number: B2355-90743 E0501 U.S.A. © Copyright 1997, Hewlett-Packard Company.
Legal Notices The information in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be held liable for errors contained herein or direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material. Warranty.
California. ©copyright 1980, 1984, 1986 Novell, Inc. ©copyright 1986-1992 Sun Microsystems, Inc. ©copyright 1985-86, 1988 Massachusetts Institute of Technology. ©copyright 1989-93 The Open Software Foundation, Inc. ©copyright 1986 Digital Equipment Corporation. ©copyright 1990 Motorola, Inc.
Contents 1. Logging into a Host with telnet Checking Your Local Terminal Configuration . . . . . . . . . . . . . . . . . . . . .10 Using telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 A Faster Way to Use telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12 Checking Your Remote Terminal Configuration . . . . . . . . . . . . . . . . . . .13 Changing the Behavior of Carriage Returns . . . . . . . . . . . . . . . . . . . . .
Contents Using ruptime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ruptime Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 7. Listing Users with rwho Using rwho . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 rwho Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 8.
Preface This manual describes how to use the HP 9000 Internet Services product. It is intended for people who have experience with HP-UX and access to the HP-UX man pages. For information on administering the Internet Services, see Installing and Administering Internet Services. NOTE On HP-UX 11i v1.5, the “Secure Internet Services is not supported. This will supported in the upcoming release of HP-UX.
1 Logging into a Host with telnet telnet is used to log into a remote HP-UX, UNIX, or non-UNIX host that supports the ARPA services. It allows you to do work on the remote host as if you were using a terminal directly attached to the remote host. For more information, type man 1 telnet at the HP-UX prompt.
Logging into a Host with telnet Checking Your Local Terminal Configuration Checking Your Local Terminal Configuration Before you log into a remote host with telnet or rlogin, ensure that your local terminal configuration settings are correct for the type of remote communication you intend to perform. Two factors determine whether you need to change your local terminal configuration settings: • The type of remote host you intend to log into. • The type of applications you intend to run on the remote host.
Logging into a Host with telnet Using telnet Using telnet 1. Type telnet at the HP-UX prompt: telnet This starts telnet in its command state. In command state, telnet displays the telnet> prompt. From command state, you can execute telnet commands. Type ? at the telnet> prompt for a list of telnet commands. 2. At the telnet> prompt, type open hostname or open IP_address, as in the following example, to connect to a remote host: telnet> open hpabsa 3.
Logging into a Host with telnet A Faster Way to Use telnet A Faster Way to Use telnet 1. Type telnet hostname or telnet IP_address at the HP-UX prompt, as in the following example: telnet hpabsa 2. Type your user name and password when the remote host prompts you for it. If you are using the Secure Internet Services version of telnet you will not be prompted for a login or password. You must have a valid login to the remote host in order to connect to it with telnet.
Logging into a Host with telnet Checking Your Remote Terminal Configuration Checking Your Remote Terminal Configuration After you have connected to the remote host, if you are using an HP terminal or an HP terminal emulator (like a terminal window in HP VUE), follow this procedure to check your terminal settings on the remote host. 1. Issue the following command at the remote host’s command prompt to make sure your terminal type is set to hp: echo $TERM 2.
Logging into a Host with telnet Changing the Behavior of Carriage Returns Changing the Behavior of Carriage Returns When some remote hosts send a carriage return to your local host, your local host may need to change the carriage return into a carriage return-line feed combination. 1.
Logging into a Host with telnet Obtaining Help Obtaining Help You can obtain summary information about telnet commands with telnet’s ? command. You can either list the commands or get information about a specific command. Listing the telnet Commands 1. If you are not at the telnet> prompt, enter the telnet escape character (usually CTRL-]) to display the prompt. 2. At the telnet> prompt, enter the following: ? telnet lists its commands.
Logging into a Host with telnet Obtaining Help 16 Chapter 1
2 Logging into a Host with rlogin rlogin is used to log into a remote HP-UX or UNIX host from your local host. It allows you to do work on the remote host as if you were using a terminal directly attached to the remote host. For more information, type man 1 rlogin at the HP-UX prompt.
Logging into a Host with rlogin Using rlogin Using rlogin If you have an account on a remote host, you can use rlogin to log into the remote host. Follow these steps: 1. Before you log into a remote host with rlogin, ensure that your local terminal configuration settings are correct for the type of remote communication you intend to perform. See “Checking Your Local Terminal Configuration” on page 10. 2.
Logging into a Host with rlogin Using rlogin that you can log into the remote host without having to supply your remote login name and password. Follow these steps: 1. If you do not know where your home directory is, log into the remote host and issue this command to find out: echo $HOME 2. Create a file called .rhosts in your home directory on the remote host, if it does not already exist, and add the following line to it: your_local_host's_name your_local_login_name 3.
Logging into a Host with rlogin Using rlogin 20 Chapter 2
3 Transferring Files with ftp With ftp, you can transfer files among HP-UX, UNIX, and non-UNIX network hosts that support ARPA services. For more information, type man 1 ftp at the HP-UX prompt.
Transferring Files with ftp Using ftp Using ftp 1. Issue the following command to establish a connection with the remote host: ftp remote_host_name or remote_IP_address 2. Type your user name when prompted for it by the remote host. If you do not have an account on the remote host, type anonymous or ftp as the user name to get access to the anonymous ftp directory. Anonymous ftp allows you access only to the directory that is set up for anonymous ftp. 3.
Transferring Files with ftp Using ftp 7. To exit from ftp and return to the HP-UX prompt on your local host, type quit at the ftp> prompt.
Transferring Files with ftp Setting Up Automatic Remote Login for ftp Setting Up Automatic Remote Login for ftp If you have an account on a remote host, you can create a .netrc file in your local home directory that allows you to log into the remote host without supplying your remote login name and password. The .netrc file can be useful for programs that need to perform ftp operations unattended. Follow these steps: 1. Create a file called .
4 Transferring Files with rcp With rcp, you can copy files between HP-UX or UNIX hosts. rcp can copy the contents of an entire directory, including the contents of all subdirectories within that directory. From your local host, you can also copy files between two remote hosts.
Transferring Files with rcp information.
Transferring Files with rcp Enabling rcp Enabling rcp Before you can use rcp to copy files to or from a remote host, the remote host must be configured in one of two ways: • You must have an account on the remote host with the same login name as your local login name, and the name of your local host must be in the remote host’s /etc/hosts.equiv file. • You must have an account on the remote host, and the name of your local host and your local login name must be in a .
Transferring Files with rcp Using rcp Using rcp You can use rcp to copy one or more files or directories from the local host to a remote host, as in the following example: rcp /tmp/memo1 /tmp/memo2 basil:/home/basil/roger This example copies /tmp/memo1 and /tmp/memo2 from the local host to user roger’s home directory on host basil. The last path on the command line is taken as the destination path, and all paths before it are copied to the destination.
5 Executing Commands with remsh remsh allows you to execute commands on a remote HP-UX or UNIX host on the network. remsh is the same command as rsh in 4.
Executing Commands with remsh versions. Type man 1 remsh for more information.
Executing Commands with remsh Enabling remsh Enabling remsh Before you can use remsh to execute commands on a remote host, the remote host must be configured in one of two ways: • You must have an account on the remote host with the same login name as your local login name, and the name of your local host must be in the remote host’s /etc/hosts.equiv file. • You must have an account on the remote host, and the name of your local host and your local login name must be in a .
Executing Commands with remsh Using remsh Using remsh The remsh command has the following syntax: remsh remote_host [-l remote_login_name] command[\;command...] If you do not give any commands on the remsh command line, remsh interprets any options in the command line as rlogin options and runs rlogin. Shell metacharacters (like <, |, or >>) are interpreted on the local host, unless you enclose them in double quotes.
6 Listing Hosts with ruptime ruptime lists status information about HP-UX or UNIX hosts on the local area network. This information is useful in identifying which network hosts you can use and how responsive each host is likely to be over the network.
Listing Hosts with ruptime Using ruptime Using ruptime For each network host, ruptime displays a status line with the following format: hostname up|down days+hours:minutes n users load n.nn, n.nn, n.nn hostname The name of a host on the network. One line is displayed for each host on the local network that is running the rwhod daemon. up|down The status of the host. If the local host stops hearing from a remote host’s rwhod daemon, that host is considered down.
Listing Hosts with ruptime ruptime Examples ruptime Examples The following example lists hosts in alphabetical order and includes idle users in the output: ruptime -a hpabca hpabcb hpabcc hpabcd down down up up 14+08:34 1:13 1+17:40, 14+06:49, 6 users, 3 users, load 0.18, 0.13, 0.09 load 0.10, 0.38, 0.49 The following example lists hosts sorted by increasing load average. Idle users are not included.
Listing Hosts with ruptime ruptime Examples 36 Chapter 6
7 Listing Users with rwho rwho lists information about HP-UX or UNIX hosts on the local area network. This information is useful in identifying who is logged into the hosts on the network and who is likely to be at their terminal or workstation.
Listing Users with rwho Using rwho Using rwho For each user logged into a network host, rwho displays an information line with the following format: user host.line month day hours:minutes hours:minutes user The user’s login name. host The host to which the user is logged in. Only hosts running the rwhod daemon will be displayed. line The user’s terminal line. month day The date the user logged in. hours:minutes The time the user logged in (in 24-hour clock notation).
Listing Users with rwho rwho Examples rwho Examples The following example lists all active users and all users who have been idle for less than an hour: rwho acb bjt chas cjc dae hpabcd:ttyp3 hpabcf:tty3p3 hpabcd:tty3p3 hpabcd:tty1p2 hpabcf:ttyp2 Jun Jun Jun Jun Jun 2 2 2 2 2 08:32 09:35 07:47 07:55 08:28 :19 <--Active :27 <--Active :57 The following example lists all users logged into network hosts, including those that have been idle for more than an hour: rwho -a acb bjt chas cjc dae gen kg scb C
Listing Users with rwho rwho Examples 40 Chapter 7
Symbols $HOME/.netrc file, 24 $HOME/.rhosts file, 19, 31 A anonymous ftp, 22 B backspace character, 13 binary transfer, ftp, 22 C carriage returns, in telnet, 14 crmod command, telnet, 14 .cshrc file, 28 E erase character, 13 /etc/hosts.equiv file, 18, 27, 31 F ftp anonymous, 22 automatic remote login, 24 binary transfer, 22 exiting, 23 help (?) command, 22 local shell commands, 22 G get command, ftp, 22 H help (?) command ftp, 22 telnet, 11, 15 $HOME/.netrc file, 24 $HOME/.rhosts file, 19, 31 hosts.
L .login file, 28 N .netrc file, 24 P PPL, 34, 38 .profile file, 28 put command, ftp, 22 R rcp errors, 28 examples, 28 return key, in telnet, 14 .rhosts file, 19, 31 rlogin exiting, 18 ruptime -a option, 34 examples, 35 explanation of display, 34 further reading, 34 over X.25 or PPL (SLIP), 34 rwho -a option, 39 examples, 39 explanation of display, 38 further reading, 38 over X.
X X.