Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>Assuming your system is unix-like</em>, and the other side has an open SSH server, I would add the public key of the user that your application runs under to the authorized_keys file in the remote side. After this, your application would be able to poll for the existence of an updated file by running</p> <pre><code>ssh username_at_remote_end@ip_address_of_remote stat -C %Z path_to_file </code></pre> <p>Which will output the seconds after the unix Epoch of the last change to the file (if found) or error (non-zero exit code) if file not found.</p> <p>To actually retrieve the file (after checking that the time-stamp is within the last 24 hours), I would use</p> <pre><code>t=$(mktemp -d) &amp;&amp; scp username_at_remote_end@ip_address_of_remote:path_to_file $t &amp;&amp; echo $t </code></pre> <p>Which will copy it to a temporary directory under <code>/tmp</code>, readable only by the user that your application is running under, and will return the name of that folder.</p> <p>All programming languages support running commands locally (in C, using <code>system()</code>; in Java, using a <code>Process</code>; ...). To keep things simple, each command would be added to a script file (say <code>poll.sh</code> and <code>retrieve.sh</code>). If the remote end changes, you only have to update &amp; test the scripts. There are direct interfaces to <code>openssh</code>, but it is probably simpler to outsource all of that work to <code>bash</code> via scripts as seen above.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload