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:
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 host basil as user andy without supplying the user name or the password,
which is pre10der.
machine basil login andy password pre10der
|
Issue the following command to make sure that your .netrc file is owned by you, the user:
Issue the following command to protect your .netrc file so only you can read it:
Move to the parent directory of your home directory,
and issue the following command to protect your home directory so
that no one else can write to it:
chmod 0755 your_home_directory
|
For more information, type man 4 netrc at the HP-UX prompt.
|
| |
|
| CAUTION: The .netrc file creates a security risk. Passwords in this
file are unencrypted. |
|
| |
|