{"id":166,"date":"2026-04-19T10:27:03","date_gmt":"2026-04-19T09:27:03","guid":{"rendered":"https:\/\/vpp.dk\/?linux_trick=copy-files-over-ssh-scp"},"modified":"2026-04-19T10:27:03","modified_gmt":"2026-04-19T09:27:03","slug":"copy-files-over-ssh-scp","status":"publish","type":"linux_trick","link":"https:\/\/vpp.dk\/?linux_trick=copy-files-over-ssh-scp","title":{"rendered":"Copy files over SSH (scp)"},"content":{"rendered":"<p>Securely transfer files between machines using scp. Works in both directions \u2014 local to remote and remote to local.<\/p>\n","protected":false},"template":"","meta":{"_trick_code":"# Local -> Remote\nscp localfile.txt user@host:\/remote\/path\/\n\n# Remote -> Local\nscp user@host:\/remote\/file.txt .\/\n\n# Recursive directory copy:\nscp -r .\/mydir user@host:\/opt\/","_trick_uploader":"shellwitch"},"trick_category":[17,21],"class_list":["post-166","linux_trick","type-linux_trick","status-publish","hentry","trick_category-networking","trick_category-ssh-remote"],"_links":{"self":[{"href":"https:\/\/vpp.dk\/index.php?rest_route=\/wp\/v2\/linux_trick\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpp.dk\/index.php?rest_route=\/wp\/v2\/linux_trick"}],"about":[{"href":"https:\/\/vpp.dk\/index.php?rest_route=\/wp\/v2\/types\/linux_trick"}],"wp:attachment":[{"href":"https:\/\/vpp.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"trick_category","embeddable":true,"href":"https:\/\/vpp.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftrick_category&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}