[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ftp question

Posted on 2014-04-23
2
Medium Priority
?
255 Views
Last Modified: 2014-05-07
Hi,
I have to ftp from one machine to another machine

1) on aa under /user/dev i have file aa.ixf

2) i want to ftp aa.ixf to  xfer@prexfer.event.ibm.com:/db2_database/db2extracts

how can i do it do i need user is password for no 2)
0
Comment
Question by:sam2929
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 40

Expert Comment

by:omarfarid
ID: 40019270
Hi,

You may use ftp within a script to transfer files.

To automate ftp within a script, use .netrc file in the user's home directory (the one who will run the script on aa). Run command:

cd

The .netrc file should not be readable by others i.e. use

chmod 400 .netrc

The entry in .netrc should be as below:

machine myftpserver
login remoteusername
password mypassword

myftpserver is the server which is the ftp server where you want to sent the file(s). It is prexfer.event.ibm.com in your case.

remoteusername is the remote user login name on the ftp server. It is xfer in your case.

mypassword is the password of the remote user on the ftp server

for more info about .netrc, please use man netrc

- The script is similar to:

cd /user/dev
ftp prexfer.event.ibm.com < END
cd /db2_database/db2extracts
text
put aa.ixf
END

If the file is binary file, then change text above to binary

Run the script
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 2000 total points
ID: 40019272
Sorry, there is typo in the script. Change

ftp prexfer.event.ibm.com < END

to

ftp prexfer.event.ibm.com << END
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question