Delete files older than one day with SFTP in remote server
<p>I want to establish a cron job in order to delete some files from a remote server in which I have only SFTP access. I don't have any shell access.
What is the best way to connect to the remote server and do that?
I have installed <code>sshpass</code> and did something like this:</p>

<pre><code>sshpass -p pass sftp user@host
</code></pre>

<p>But how can I pass commands in order to list the old files and delete them?</p>