• Post Reply Bookmark Topic Watch Topic
  • New Topic

Writing to remote computer via Sftp

 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I need to use the sftp protocol to write to a remote computer using sftp,
How do I write Java code that will do this for me ?
any advice will be good ( even advice as to -'were to look' )
A short code sample will be great !! ( )
anything !

Thanks alot !
Dave
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35737
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
In the "where to look" department:
JFtp is an open-source client that supports FTP. You can take a look at how they did it for the code.
 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks but I didn't find what I was looking for there.
I just need a small example....
[ February 27, 2005: Message edited by: Dave Jones ]
 
Senthil B Kumar
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you download the jar file, it comes with few examples of invoking basic commands of put,get in ftp , through sFtp. You can use them.

the following site gives another java implementation of sFtp

http://www.jcraft.com/jsch/examples/
[ February 28, 2005: Message edited by: kolkata prince ]
 
Dave Jones
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey thanks alot for the quick answer!
now I get an Error :
java.security.NoSuchAlgorithmException: Algorithm DH not available
argh ! nothing I do helps... If I add it to the path-it says I have duplicate, if I don't, I get this error, anybody saw this error before??? (and knows what to do....)
thanks again good people of the ranch!
Dave
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!