Operating System - HP-UX
1752618 Members
4580 Online
108788 Solutions
New Discussion юеВ

Re: FTP'ing exports from one machine to another

 
SOLVED
Go to solution
Brian Gebhard_1
Advisor

FTP'ing exports from one machine to another

I'm trying to connect from machine 1 to machine 2 and run a script on machine 2. The copy the the output file back again to machine 1 and use it in another script. I want to make this all automatic but the only thing I've found so far is ftp and I don't seem to have the permissions set up correctly to run these ftp options. Is there something better out there to accomplish this or does anyone know how to change the server permissions to get ftp to allow me to do this?

Thanks in advance
6 REPLIES 6
Ken Hubnik_2
Honored Contributor

Re: FTP'ing exports from one machine to another

You may be able to use rdist.

man rdist
Sridhar Bhaskarla
Honored Contributor
Solution

Re: FTP'ing exports from one machine to another

HI Brian,

ftp has no options to run scripts on other systems. You will need to depend on ssh followed by scp or sftp (else remsh followed by rcp or ftp) to get what you want.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James R. Ferguson
Acclaimed Contributor

Re: FTP'ing exports from one machine to another

Hi Brian:

You can change the 'umask' under which 'ftpd' runs by adding the argument '-u nnn' [where 'nnn' is the desired mask (default is 027)] to the 'ftp' argument in '/etc/inetd.conf'. See the man pages for 'ftpd' for more information. When done, restart 'inetd' as:

# /usr/sbin/inetd -c

Regards!

...JRF...
Ian Dennison_1
Honored Contributor

Re: FTP'ing exports from one machine to another

export RC=`remsh server2 '/usr/local/bin/script1; echo $?`

# Back quotes on outside, single quotes on inside

if (( $RC < 1 ))
then
rcp server2:/tmp/outputfile /tmp
# DO second script
fi

Share and Enjoy! Ian
Building a dumber user
Steven E. Protter
Exalted Contributor

Re: FTP'ing exports from one machine to another

I'd export filesystems on both systems. Then run nfs server.

This would be a nice step to simply the problem.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
RAC_1
Honored Contributor

Re: FTP'ing exports from one machine to another

There can be so may ways to do this.

1 use of remsh
2 for safe way - scp
3 just mail the result to machine 1
4 ftp the result file to machine 1
There is no substitute to HARDWORK