I started with requirement of reading and writing files in from/in a directory on a remote Ubuntu machine.
First, I wrote a Java program that could read,write files
We used sshfs. You can add to /etc/fstab the line:
sshfs#user@remoteAddress:remoteDir /mnt/ssh fuse defaults 0 0
and then mount /mnt/ssh
mount /mnt/ssh