I am using this to copy from A to B.
But if for example the folder /config doesnt exist it gives me an exception. How can I solve it? I tried mkdirs=\"true\" but it runs to erro
You can use sshexec to create directories tree on remote machine before coping.
mkdir -p creates directories if not exists.
(How to mkdir only if a dir does not already exist?)