Skip to main content

Posts

Showing posts from March, 2014

Secure file transfer with Java and Versile

Just made an example of how to transfer a file over a secure and authenticated connection in pure Java - without having to use additional technology like ssh/scp. Versile has all you need for creating a secure and authenticated connection, and you'll decide what files you want to expose - nothing more - nothing less. This is the file server (include versile.jar in your classpath - and create a file called "personregister.txt" in the working directory): package versileexample; import java.io.File; import java.io.FileNotFoundException; import java.io.RandomAccessFile; import java.security.interfaces.RSAPublicKey; import java.util.logging.Level; import java.util.logging.Logger; import org.versile.Versile; import org.versile.common.auth.VAuth; import org.versile.common.auth.VCredentials; import org.versile.common.auth.VPrivateCredentials; import org.versile.common.peer.VInetSocketPeer; import org.versile.common.peer.VPeer; import o