1748268 Members
3544 Online
108760 Solutions
New Discussion юеВ

ftp script

 
SOLVED
Go to solution
John_1005
Advisor

ftp script

Hello,

This hp-ux system won't allow ftp. sftp commands won't work either. I can only ftp the file from a windows desktop to this system using an ftp client (psftp). I have to automate the ftp process as a command line script.. Which ftp protocol is supported by the hpux system so that I can test a script from windows? Any ideas?
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: ftp script

HP-UX can support both standard FTP and SFTP (if the ssh software is installed) but the service(s) must be enabled. If I were doing your task I would use Perl because you get error checking for free and Perl will run on Windows. Check out the Net::FTP module.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: ftp script

Hi John:

You don't say what doesn't work. Make sure that your '/etc/inetd.conf' file allows the 'ftpd' daemon to be started. You should have a line that looks like:

ftp stream tcp nowait root /usr/lbin/ftpd

If not, add it, or uncomment it, and restart the 'inetd' daemon:

# /usr/sbin/inetd -c

Regards!

...JRF...
Kofi ARTHIABAH
Honored Contributor

Re: ftp script

If you want to share files between HPUX and a windows box, have you considered using CIFS/9000? Its free... and you can do a lot of neat things with it.

Good luck.
nothing wrong with me that a few lines of code cannot fix!
John_1005
Advisor

Re: ftp script

Hello all,

Thanks for the replies. the hp-ux system supports sftp.

$ ps -ef | grep -i ftp
21782 21781 0 Oct 20 ? 0:00 sh -c /opt/ssh/libexec/sftp-server
10687 10686 0 09:15:19 ? 0:00 /opt/ssh/libexec/sftp-server


However, at the windows xp dos command, if I

>sftp
'sftp' is not recognized as an internal or external command, operable program or batch file.

So, in order to have sftp connect to hpux system from the windows system, could you tell what I require ...

Thanks
A. Clay Stephenson
Acclaimed Contributor

Re: ftp script

Just do a Google search for "SFTP Client for Windows"; you should get tons of hits.
If it ain't broke, I can fix that.
Zigor Buruaga
Esteemed Contributor

Re: ftp script

Hi,

If you use psftp ( the one which comes with the PuTTY software I guess ) you should be able to use it against a HP-UX box running ssh. Only type at your DOS prompt "psftp ip_address_of_your_server" and I think it should work.

Regards,
Zigor
Kofi ARTHIABAH
Honored Contributor

Re: ftp script

On the XP box, you need an sftp client. Cygwin available from http://www.cygwin.com/ (free)
has a full suite of unix commands including all sftp etc.
you can also try http://winscp.net/eng/index.php
nothing wrong with me that a few lines of code cannot fix!

Re: ftp script

I've found that WinSCP is a nicer secure ftp tool that uses sftp. It has a GUI interface and unlike psftp.exe, it can transfer in binary and ascii mode. ASCII mode transfer is needed to move text files from DOS to UNIX format, because it auto-translates the CR/LF to CR conversion.

You can find WinSCP easily via web search.

Regards,
Steve