I want to copy files securely from one computer to another, the other computer however isn't trusted and I don't have direct access to it other then giving the owner of the computer instructions. In addition to that this is a one-time only situation, so any cumbersome setup should be avoided. What would be the easiest and most portable way to do it?
What I have in mind would be a program with the following workflow:
The host with the files issues a hypothetical command to make the files available, protected with a password:
file-offer -p PASSWORD file1 file2 file3 directoryThe other issuse a hypothetical command with the password to receive a file (a GUI to select files would be welcome as well):
file-receive -p PASSWORD file2
The closest thing I have right now is this hack, which works but isn't very comfortable and would give Windows users some trouble:
tar cf - [files]... | gpg -c --passphrase PASSWORD | nc -l -p 6666nc host1 6666 | gpg --passphrase PASSWORD | tar xf - [files]...
Some more notes:
- neither of the users has root access (so no servers accessing ports < 1024)
- copying files prior to making them available should be avoided (i.e. no
cp files /var/www/) - ssh/scp doesn't work as that would require giving the password of one host to the other
- using rsync with rsyncd.conf mostly works, but is cumbersome to setup and doesn't provide a way to share a single file, only directories
- a ftp/http server that could be launched and configured with a single command line could work, https support for encryption would be welcome as well as a way to share single files instead of just directories, don't know any server that fits these criteria
- USB isn't an option as the other host might only be available over the network
- a file upload service isn't an option either (file size limits, upload to untrusted third party, user might be on LAN, not the Internet. etc.)