netrc - Man Page
user configuration for ftp
Description
This file contains configuration and autologin information for the File Transfer Protocol client ftp(1).
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:
- machine name
Identify a remote machine name. The auto-login process searches the
.netrcfile for amachinetoken that matches the remote machine specified on the ftp command line or as anopencommand argument. Once a match is made, the subsequent.netrctokens are processed, stopping when the end of file is reached or anothermachineor adefaulttoken is encountered.- default
This is the same as
machinename except thatdefaultmatches any name. There can be only onedefaulttoken, and it must be after allmachinetokens. This is normally used as:default login anonymous password user@sitethereby giving the user automatic anonymous ftp login to machines not specified in
.netrc. This can be overridden by using the-nflag to disable auto-login.- login name
Identify a user on the remote machine. If this token is present, the auto-login process will initiate a login using the specified name.
- password string
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
.netrcfile for any user other than anonymous, ftp will abort the auto-login process if the.netrcis 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 specified string if the remote server requires an additional account password, or the auto-login process will initiate an
ACCTcommand if it does not.- macdef name
Define a macro. This token functions like the ftp
macdefcommand functions. A macro is defined with the specified name; its contents begin with the next.netrcline and continue until a null line (consecutive new-line characters) is encountered. If a macro namedinitis defined, it is automatically executed as the last step in the auto-login process.
See Also
ftp(1), ftpd(8)
Referenced By
curl(1), ddupdate(8), fetchmail(1), ftp(1), mc(1), mpop(1), msmtp(1), public-inbox-watch(1), transmission-remote(1).