Solved

ftp auto-fetching syntax in SuSE 9.0 Professional

Posted on 2004-08-26
3
653 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
  • 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

778 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