aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes SFTP from local Server to Remote Using JCraft Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "SFTP from local Server to Remote Using JCraft" Watch "SFTP from local Server to Remote Using JCraft" New topic
Author

SFTP from local Server to Remote Using JCraft

Aswin Gopal
Greenhorn

Joined: Apr 10, 2014
Posts: 6

Hi,

I am trying to create an application that can check SFTP connection to the remote systems from my local server(eg. tsti5454.boydfd.com). I am using Jscraft API for this purpose.



Now when I have connected to my local server, from here I should be able to SFTP another server : "sftp arden@skyblue.com". But I have no clue how that is done. I am new to JCraft. Please help me with this.

Thanks.

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2596
    
    9

Did you check out the JCraft site jcraft.com? There is a page with examples.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Aswin Gopal
Greenhorn

Joined: Apr 10, 2014
Posts: 6
Yes I did. In all those example , in a single session they SFTP to remote location.

They dont connect to one server and then SFTP to another from it. I didnt come across such a example.
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2596
    
    9

Ah is there a difference between FTP-ing from server to server than from location to another location?

As long as the destination is where you want the files to go ... then you are basically FTP-ing or copying.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

It is not clear to me what you are trying to do. You seem to have 3 machines (say A, B and C) and currently you have setup a SSH connection from A to B but do you then want to SFTP from B to C moving files only between B and C or are you wanting to move files between A and C ?

If the former then just issue simple SFTP commands from B to C through your A to B SSH connection. If the latter then why do you need to go via B.

Of course I could have totally misunderstood your requirement. In which case could you elaborate on your requirement and enlighten me.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: SFTP from local Server to Remote Using JCraft