Using HP-UX Internet Services (February 2007)

The put command transfers a file from the local host to the remote host. The get
command transfers a file from the remote host to the local host. If you do not
specify a destination_filename, the file is copied with the original name.
7. To exit from ftp and return to the HP-UX prompt on your local host, type quit
at the ftp> prompt.
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 used for programs that need
to perform ftp operations unattended.
The following steps describe how to create the .netrc file on the local host:
1. Create a file called .netrc in your home directory on the local host, if it does not
already exist, and add the following line to it:
machine host_name login login_name password password
The following example allows you to use ftp to log into the host basil as user
andy without supplying the user name or the password, which is pre10der.
machine basil login andy password pre10der
2. Issue the following command to ensure that you are the owner of the .netrc file:
ls -l .netrc
3. Issue the following command to protect your .netrc file so that only you can
read it:
chmod 0400 .netrc
4. Move to the parent directory of your home directory, and issue the following
command to protect your home directory by restricting write permission to other
users (that is, group and others):
chmod 0755 your_home_directory
For more information, type man 4 netrc at the HP-UX prompt.
IMPORTANT: The .netrc file creates a security risk because the password in this
file is not encrypted.
20 Transferring Files with ftp