Local flder t1/, file tt1.

scp -r -P 22 t1/ [email protected]:/mnt/share/t2/
-r: recursively.
Port nr. option is in captical char.

  • if /mnt/share/ has folder t2/, t1/ will be in t2/.
  • if no such a dir, t1/ will be renamed as t2/ inside share/.
  • if there is file t2: mnt/share/t2, will get error "scp: /mnt/share/t2: Not a directory".
  • scp will NOT create new folder on server.