Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35614 > unrolled thread
| Started by | mike <mikaelpetterson@hotmail.com> |
|---|---|
| First post | 2016-09-15 05:55 -0700 |
| Last post | 2016-09-15 21:07 -0400 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.java.programmer
Ftp between two machines but ftp transfer started from a 3:rd one. mike <mikaelpetterson@hotmail.com> - 2016-09-15 05:55 -0700
Re: Ftp between two machines but ftp transfer started from a 3:rd one. Martin Gregorie <martin@address-in-sig.invalid> - 2016-09-15 15:09 +0000
Re: Ftp between two machines but ftp transfer started from a 3:rd one. Arne Vajhøj <arne@vajhoej.dk> - 2016-09-15 20:57 -0400
Re: Ftp between two machines but ftp transfer started from a 3:rd one. Arne Vajhøj <arne@vajhoej.dk> - 2016-09-15 21:07 -0400
| From | mike <mikaelpetterson@hotmail.com> |
|---|---|
| Date | 2016-09-15 05:55 -0700 |
| Subject | Ftp between two machines but ftp transfer started from a 3:rd one. |
| Message-ID | <84c912e2-5fc1-4d8b-b194-0677f96b0c14@googlegroups.com> |
Hi, We are looking into ftp:ing between two machines ( call them A and B) and the the ftp transfer should be started from a third machine ( call it C). Has anyone done this before, using java? Do you have any hints or ideas on how to proceed? Is it possible to do that with any of the existing libraries? I have the java framework residing on machine C. I guess I need: - host and password for A and B? - file/files to be transferred. All hints are most welcome. //mike
[toc] | [next] | [standalone]
| From | Martin Gregorie <martin@address-in-sig.invalid> |
|---|---|
| Date | 2016-09-15 15:09 +0000 |
| Message-ID | <nredja$fua$1@dont-email.me> |
| In reply to | #35614 |
On Thu, 15 Sep 2016 05:55:17 -0700, mike wrote:
> Hi,
>
> We are looking into ftp:ing between two machines ( call them A and B)
> and the the ftp transfer should be started from a third machine ( call
> it C). Has anyone done this before, using java?
>
I do it all the time, but by logging into machine C and starting an SSH
session on A, from which I run ftp transfers between machines A and B. I
realise this is probably not what you want, but if you supplied bit more
detail that would help people to give more relevant advice. Some
questions:
- what will cause machine C to start the FTP session?
IOW will it be manually started?
Automatically triggered by some sort of timer?
Triggered by some other event?
- what OS(es) are involved?
If Linux, I'd do the lot with bash scripts, standard SSH clients and
servers. I'd use a cron job to run scheduled transfers.
If Windows, I'd do much the same since FOSS FTP and SSH clients and
servers are available and so are 3rd party cron implementations.
- why use FTP rather than SSH?
- if you have to implement it as a set of Java processes there are
Java libraries out there that provide FTP and SSH client code and
also pure Java implementations of FTP and SSH servers, but why
design/write/test Java code when both FTP and SSH clients and servers
are available as free open source packages?
> Do you have any hints or ideas on how to proceed? Is it possible to do
> that with any of the existing libraries? I have the java framework
> residing on machine C.
>
See above.
> I guess I need:
>
> - host and password for A and B?
> - file/files to be transferred.
>
Indeed.
--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-09-15 20:57 -0400 |
| Message-ID | <nrfg2b$126q$1@gioia.aioe.org> |
| In reply to | #35615 |
On 9/15/2016 11:09 AM, Martin Gregorie wrote: > On Thu, 15 Sep 2016 05:55:17 -0700, mike wrote: >> We are looking into ftp:ing between two machines ( call them A and B) >> and the the ftp transfer should be started from a third machine ( call >> it C). Has anyone done this before, using java? >> > I do it all the time, but by logging into machine C and starting an SSH > session on A, from which I run ftp transfers between machines A and B. I > realise this is probably not what you want, but if you supplied bit more > detail that would help people to give more relevant advice. Some > questions: > > - what will cause machine C to start the FTP session? > IOW will it be manually started? > Automatically triggered by some sort of timer? > Triggered by some other event? This capability is build into the FTP protocol. The trick is the fact that FTP uses two connections: command and data. That is usually just a hassle. But it is what enable this. FTP client on C makes command connection to A. FTP client on C makes command connection to B. FTP client uses command connection to tell B to listen for data connection. FTP client uses command connection to tell A to establish data connection to B Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-09-15 21:07 -0400 |
| Message-ID | <nrfgkb$12n3$1@gioia.aioe.org> |
| In reply to | #35614 |
On 9/15/2016 8:55 AM, mike wrote: > We are looking into ftp:ing between two machines ( call them A and B) > and the the ftp transfer should be started from a third machine ( > call it C). Has anyone done this before, using java? > > Do you have any hints or ideas on how to proceed? Is it possible to > do that with any of the existing libraries? I have the java framework > residing on machine C. Apache Commons Net can do it. They even have a small example: https://commons.apache.org/proper/commons-net/examples/ftp/ServerToServerFTP.java Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web