Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How I can automatically login with fpt linux

Status
Not open for further replies.

YAOK

Programmer
Mar 6, 2001
3
MX
When i acces my lan with ftp linux, i lost time loggin and puting my password to my servers. Is there a way to log automatically and execute a macro to get and put files? Thanks write to fdisk7@hotmail.com
 
ftp -i xxx.xxx.xxx.xxx << EOT
lcd /var/log
bin
hash
put messages
lcd /var/log/mail
put mail.log
bye
EOT

Where xxx.xxx.xxx.xxx is the IP address of the FTP server.

You also need a .netrc file is the home directory of the user who is executing this script with the following in it:

machine xxx.xxx.xxx.xxx login <username> password <password>

Hope this helps,
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top