You can add a port with the -P param You can do it recursive with the -r param HINT: If you got an “Too many authentication failures for X” errror, you can add the param -o PubkeyAuthentication=no . If you couldn’t authenticate via ssh key, you can use sshpass to authenticate via password: