221 lines
3.7 KiB
HTML
221 lines
3.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of NETRC</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>NETRC</H1>
|
|
Section: File Formats (5)<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
<BR>BSD mandoc<BR>
|
|
Linux NetKit (0.17)
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
<B>netrc</B>
|
|
|
|
- user configuration for ftp
|
|
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>~/.netrc</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
This file contains configuration and autologin information for the
|
|
File Transfer Protocol client
|
|
<A HREF="/cgi-bin/man/man2html?1+ftp">ftp</A>(1).
|
|
|
|
|
|
<P>
|
|
|
|
The
|
|
.netrc
|
|
|
|
file contains login and initialization information
|
|
used by the auto-login process.
|
|
It resides in the user's home directory.
|
|
The following tokens are recognized; they may be separated by spaces,
|
|
tabs, or new-lines:
|
|
<DL COMPACT>
|
|
<P>
|
|
|
|
<DT id="1"><B>machine </B><I>name</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Identify a remote machine
|
|
<I>name</I>
|
|
|
|
|
|
The auto-login process searches the
|
|
.netrc
|
|
|
|
file for a
|
|
<B>machine</B>
|
|
|
|
token that matches the remote machine specified on the
|
|
<B>ftp</B>
|
|
|
|
command line or as an
|
|
<B>open</B>
|
|
|
|
command argument.
|
|
Once a match is made, the subsequent
|
|
.netrc
|
|
|
|
tokens are processed,
|
|
stopping when the end of file is reached or another
|
|
<B>machine</B>
|
|
|
|
or a
|
|
<B>default</B>
|
|
|
|
token is encountered.
|
|
<DT id="2"><B>default</B>
|
|
|
|
|
|
<DD>
|
|
This is the same as
|
|
<B>machine</B>
|
|
|
|
<I>name</I>
|
|
|
|
except that
|
|
<B>default</B>
|
|
|
|
matches any name.
|
|
There can be only one
|
|
<B>default</B>
|
|
|
|
token, and it must be after all
|
|
<B>machine</B>
|
|
|
|
tokens.
|
|
This is normally used as:
|
|
<P>
|
|
|
|
|
|
<BLOCKQUOTE><TT>default login anonymous password <A HREF="mailto:user@site">user@site</A></TT></BLOCKQUOTE>
|
|
<P>
|
|
|
|
thereby giving the user
|
|
<I>automatic</I>
|
|
|
|
anonymous ftp login to
|
|
machines not specified in
|
|
.netrc
|
|
|
|
|
|
This can be overridden
|
|
by using the
|
|
-<B>n</B>
|
|
|
|
flag to disable auto-login.
|
|
<DT id="3"><B>login </B><I>name</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Identify a user on the remote machine.
|
|
If this token is present, the auto-login process will initiate
|
|
a login using the specified
|
|
<I>name</I>
|
|
|
|
|
|
<DT id="4"><B>password </B><I>string</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Supply a password.
|
|
If this token is present, the auto-login process will supply the
|
|
specified string if the remote server requires a password as part
|
|
of the login process.
|
|
Note that if this token is present in the
|
|
.netrc
|
|
|
|
file for any user other
|
|
than
|
|
<I>anonymous </I>
|
|
|
|
|
|
<B>ftp</B>
|
|
|
|
will abort the auto-login process if the
|
|
.netrc
|
|
|
|
is readable by
|
|
anyone besides the user.
|
|
<DT id="5"><B>account </B><I>string</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Supply an additional account password.
|
|
If this token is present, the auto-login process will supply the
|
|
specified string if the remote server requires an additional
|
|
account password, or the auto-login process will initiate an
|
|
<B>ACCT</B>
|
|
|
|
command if it does not.
|
|
<DT id="6"><B>macdef </B><I>name</I>
|
|
|
|
|
|
|
|
|
|
<DD>
|
|
Define a macro.
|
|
This token functions like the
|
|
<B>ftp</B>
|
|
|
|
<B>macdef</B>
|
|
|
|
command functions.
|
|
A macro is defined with the specified name; its contents begin with the
|
|
next
|
|
.netrc
|
|
|
|
line and continue until a null line (consecutive new-line
|
|
characters) is encountered.
|
|
If a macro named
|
|
<B>init</B>
|
|
|
|
is defined, it is automatically executed as the last step in the
|
|
auto-login process.
|
|
</DL>
|
|
<P>
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?1+ftp">ftp</A>(1),
|
|
|
|
|
|
<A HREF="/cgi-bin/man/man2html?8+ftpd">ftpd</A>(8)
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="10"><A HREF="#lbAE">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:04 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|