Solved

ftp auto-fetching syntax in SuSE 9.0 Professional

Posted on 2004-08-26
3
654 Views
Last Modified: 2013-12-15
Hi.
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 192.168.1.230 and I'm logging into the system as root.  Accordi
ng to the man pages, the command would be:

ftp://root:password@192.168.1.230:21 /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.

Thanks.
0
Comment
Question by:ggs54
[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
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 250 total points
ID: 11908809
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 192.168.1.230 /path-to/server-files *

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

Also note that the FTP server on 192.168.1.230 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] *  192.168.1.230:/path-to/server-files

See 'man ssh-keygen' and 'man scp' for details.
0
 
LVL 1

Author Comment

by:ggs54
ID: 11909585
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.

0
 
LVL 1

Author Comment

by:ggs54
ID: 11915764
Thanks.  I downloaded the current version of ncftp and it works exactly as needed.  I appreciate your help.

ggs54
0

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

717 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