It seems like net/scp in Ruby (I'm using 1.8.7) only accepts a path and not binary data as "local_file" parameter.
In my case, I have the local file stored in a variable. Am I required to save->upload->delete a local file, or is it possible to send the file "directly" to the remote server via SSH without temporary creating it locally?
I'm open to other solutions than SCP. What I tried so far is using normal SSH and then executing
echo 'binary here' > remote_file_name
however I'm concerned about command length limits in Unix and I faced escaping problems and so forth...