in reply to Howto Access Two Consecutive Hosts with Net::SFTP

It depends on what "automatically" means, but interpreting it one way, you could have a submission program on your home machine (which envelops the files with a header and trailer) and a forwarding daemon on host1 (which recognises that the trailer marks complete inward transmission of the file, strips the hdr/trlr off again and then sftp's it onward), using perhaps Net::Daemon to control the forwarding daemon from your PC.

(Update: Alternatively, could send the file more directly to the daemon with Net::Daemon::SSL, but that seems actually trickier for a forwarding daemon. In the first solution above, the main purpose of the header is to specify or imply the destination path.)

-M

Free your mind

  • Comment on Re: Howto Access Two Consecutive Hosts with Net::SFTP