Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 693
  • Last Modified:

ftp auto-fetching syntax in SuSE 9.0 Professional

I'm using SuSE 9.0 Professional and am trying to set up a transfer script, u
sing the auto-fetching feature of ftp.  I've printed the "man" pages for ftp
 and have tried every combination that I can think of for the systax.  Howev
er, I am never able to connect and transfer my files.

Let's say that I want to transfer all of my host files in /tmp to my client.
  My host is and I'm logging into the system as root.  Accordi
ng to the man pages, the command would be:

ftp://root:password@ /tmp/*

I continue to get the message, "No such file or directory."

If I enter the commands manually, everything works correctly.

Any help with this would be appreciated.

  • 2
1 Solution
I think SuSE 9.0 includes the ncftp package and using it would be the easiest way of doing this in a script. The script might contain:

cd /tmp
ncftpput [-R] -u root -p password /path-to/server-files *

which would transfer all files in /tmp on the local machine to /path-to/server-files on Note that you'd need the -R option if you have directories that need to be transferred.

Also note that the FTP server on must be configured to allow root to login to FTP, which is something that most FTP servers disallow for security reasons. You'll have to reconfigure that FTP server to allow that, or better (for security reasons) use an ordinary user account for the FTP transfer.

It would also be possible (and safer) to use scp and pre-shared keys to do this within a script. With a public key generated on the server (by executing ssh-keygen) and transfered to ~root/authorized_keys you could do:

cd /tmp
scp [-r] *

See 'man ssh-keygen' and 'man scp' for details.
ggs54Author Commented:
Thanks.  I'll check to see if SuSE has the ncftp package.  I'm actually transferring files the other way, from an HP-UX host to the client pc.  My HP-UX machine does allow root to log in and use ftp.  The files being transferred are all of my database files, all of which are owned by root, as well as programs, etc.  Basically, I'm setting up a Linux pc in another building and want to transfer all of these files automatically each night.  Just one more method of backup to guard against catastrophic failure i.e. if our building burns down, we have a backup on another machine in another building.

I'll let you know if I have the ncftp package and how it works.

Thanks for your response.

ggs54Author Commented:
Thanks.  I downloaded the current version of ncftp and it works exactly as needed.  I appreciate your help.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now