Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

File Format Reference Pages netrc(4)
NAME
netrc - le for ftp remote login data
DESCRIPTION
The .netrc le contains data for logging in to a remote host over the network for le transfers by
ftp(1). This le resides in the users home directory on the machine initiating the le transfer. Its
permissions should be set to disallow read access by group and others (see the chmod(1) refer-
ence page).
The following tokens are recognized; they may be separated by
SPACE
, TAB
,or
NEWLINE
char-
acters:
machinename
Identify a remote machine name. The auto-login process searches the .netrc le for a
machine token that matches the remote machine specied on the ftp command line or as
an open command argument. Once a match is made, the subsequent .netrc tokens are
processed, stopping when the
EOF
is reached or another machine token is encountered.
login name
Identify a user on the remote machine. If this token is present, the auto-login process
will initiate a login using the specied name.
password string
Supply a password. If this token is present, the auto-login process will supply the
specied string if the remote server requires a password as part of the login process.
Note: if this token is present in the .netrc le, ftp will abort the auto-login process if the
.netrc is readable by anyone besides the user.
account string
Supply an additional account password. If this token is present, the auto-login process
will supply the specied string if the remote server requires an additional account pass-
word, or the auto-login process will initiate an command if it does not.
macdef name
Dene a macro. This token functions as the ftp macdef command functions. A macro is
dened with the specied name; its contents begin with the next .netrc line and continue
until a null line (consecutive
NEWLINE characters) is encountered. If a macro named
init is dened, it is automatically executed as the last step in the auto-login process.
EXAMPLE
The command:
machine ray login demo password mypassword
allows an autologin to the machine ray using the login name demo with password mypassword.
FILES
~/.netrc
RELATED INFORMATION
Commands: chmod(1), ftp(1), ftpserver(7).
527188-003 Hewlett-Packard Company 1129