aspose file tools*
The moose likes Java in General and the fly likes Remote File integrity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Remote File integrity" Watch "Remote File integrity" New topic
Author

Remote File integrity

Arun Suresh
Greenhorn

Joined: Sep 02, 2008
Posts: 18
Hi all,

I have been checking the file integrity(calculating SHA1 cheksum) of tar files in linux server in my java code by using linux sha1sum.

Now i have to implement the same for tar files stored in remote SFTP servers (eg freeFTPd or linux native) without copying them to this server or streaming them to stdin.
I can do it after copying or by streaming to stdin of this server.but any method in which i can remotely do it?
any pointers?

Thanks
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

There's no way to do this remotely that I can think of .


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

If you have sftp access, then you probably have ssh access. Connect with ssh, and run the "sum" command (or any other command of your choosing) on the file.


[Jess in Action][AskingGoodQuestions]
Arun Suresh
Greenhorn

Joined: Sep 02, 2008
Posts: 18
thanks for the help.

connecting ssh on linux SFTP server is fine. but i need to support windows SFTP server also. how do i run any command remotely on files in that location?

any help is appreciated.

thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Remote File integrity