Can the box/PC from which you're ssh-ing to zLinux also connect to the
Winx box on which you want to put the file? 
If so, and if the zLinux ssh server has port-forwarding enabled, you can
port-forward (tunnel) SMB thru your PC's shh client to connect your
mainframe Linux to your Winx share. You then could use smbclient, for
instance, to put files from zLinux onto your Winx share.

-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
McKown, John
Sent: Wednesday, December 29, 2004 12:53 PM
To: [email protected]
Subject: ftp question, not really Linux

I hope ya'll don't mind. This is really more of a generic UNIX ftp type
question. Suppose that I have a program whose output I want to go to a
remote system. Futher suppose that said remote system only have ftp
capability. I cannot use NFS, Samba, netcat, ... . Well, the remote
system is a Windows system. 'Nuff said.

At present I create a file from my program, ftp the file to the Windows
box, then rm the output file. In a spat of insanity, I have come up with
an alternative solution, sort of. Instead of creating an physical output
file, I use mknod to create a socket in the filesystem with the same
name and open() it. I then create a pipe(). I fork() ftp, with the stdin
associated with one of the pipe() file descriptors and stdout/stderr
associated with the other pipe() file descriptor. I then feed the
appropriate ftp commands to the ftp process via the pipe. Basically, I
feed in the userid and password, followed by a "put". The "put" command
references the filesystem name which is socket that I did the mknod()
and open() on. I feed my report out this. This places my report
"directly" on the Windows server.

Is this crazy? I do understand the possible problems if an error occurs
in the ftp process. I won't have my report anywhere else to send later.
In this case, I guess that I would "restart" my report generator to
create an actual disk file on the Linux box.

It's a low traffic season.

Hope everybody had a good holiday.


--
John McKown
Senior Systems Programmer
UICI Insurance Center
Information Technology

This message (including any attachments) contains confidential
information intended for a specific individual and purpose, and its'
content is protected by law.  If you are not the intended recipient, you
should delete this message and are hereby notified that any disclosure,
copying, or distribution of this transmission, or taking any action
based on it, is strictly prohibited.

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to