java and ssh/sftp

L

Luke

Hello, I'm hoping someone can give me a suggestion on solving a
programming problem. I have a java program which generates new versions
of content for a website. After the new content files have been created
we need to use sftp to transfer the files to the remote site, and then
use ssh to log on and change some symbolic links to point to the new
content. Is there anyway to automate the process and have java
interface with the sftp & ssh processes? This application runs on a
windows system.
 
A

Alex Hunsley

Luke said:
Hello, I'm hoping someone can give me a suggestion on solving a
programming problem. I have a java program which generates new versions
of content for a website. After the new content files have been created
we need to use sftp to transfer the files to the remote site, and then
use ssh to log on and change some symbolic links to point to the new
content. Is there anyway to automate the process and have java
interface with the sftp & ssh processes? This application runs on a
windows system.

My first suggestion is to look at Ant. Ant has a SCP (secure copy)
optional target available, amongst things; it may have other useful
targets made for it for such remote tasks....
 
D

Daniel Pitts

Luke said:
Hello, I'm hoping someone can give me a suggestion on solving a
programming problem. I have a java program which generates new versions
of content for a website. After the new content files have been created
we need to use sftp to transfer the files to the remote site, and then
use ssh to log on and change some symbolic links to point to the new
content. Is there anyway to automate the process and have java
interface with the sftp & ssh processes? This application runs on a
windows system.

Among the other suggestions you have been given, you can download a
command line ssh client (I suggest cygwin or putty on windows, Linux
should come with ones "built-in").

You can then use Runtime.exec or System.exec to run and communicate
with native programs. Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top