You can use a file transfer command: sshpass -p [password] scp -r /users/Hostinger/desktop root@191.162.0.2:/writing/article Or enable SSHPASS by generating SSH key pairs. On Windows, PSCP lets you pass the password using the -pw option: sshpass -pw [password] root@191.162.0.2:/writing/article