You can make file that holds a list of machines and their associated usernames and passwords quite easily. This file is also recognized by wget (a powerful ftp and http client). You need to be in your home directory and type
At the terminal prompt type:
Now when you ftp to that machine you will automatically log in. You can add additional machines one line at a time. If you want, you can make the last line look like this:
pico .netrcThis will open a text editor into which you type:
machine machine_name_or_IP# user your_username password your_passwordThen type control-X to save the file and exit from pico.
At the terminal prompt type:
chmod 700 .netrc.This makes the file readable only by you.
Now when you ftp to that machine you will automatically log in. You can add additional machines one line at a time. If you want, you can make the last line look like this:
default user anonymous password name@machine.netThis will enable anonymous login. Even better is that wget recognizes this file and automatically logs into the machines specified. I got this from the ftp man page ('man ft' in the Terminal), very near the bottom. Enjoy!
•
[2,832 views]

