{"id":248,"date":"2009-05-31T08:31:53","date_gmt":"2009-05-31T08:31:53","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/index.php\/?p=248"},"modified":"2009-05-31T08:31:53","modified_gmt":"2009-05-31T08:31:53","slug":"syntax-for-secure-copy-scp","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/","title":{"rendered":"Syntax for Secure Copy (scp)"},"content":{"rendered":"<p>What is Secure Copy?<\/p>\n<p>scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.<br \/>\nExamples<br \/>\nCopy the file &#8220;foobar.txt&#8221; from a remote host to the local host<\/p>\n<pre><code>scp your_username@remotehost.edu:foobar.txt \/some\/local\/directory<\/code><\/pre>\n<p>Copy the file &#8220;foobar.txt&#8221; from the local host to a remote host<\/p>\n<pre><code>scp foobar.txt your_username@remotehost.edu:\/some\/remote\/directory<\/code><\/pre>\n<p>Copy the directory &#8220;foo&#8221; from the local host to a remote host&#8217;s directory &#8220;bar&#8221;<\/p>\n<pre><code>scp -r foo your_username@remotehost.edu:\/some\/remote\/directory\/bar<\/code><\/pre>\n<p>Copy the file &#8220;foobar.txt&#8221; from remote host &#8220;rh1.edu&#8221; to remote host &#8220;rh2.edu&#8221;<\/p>\n<pre><code>scp your_username@rh1.edu:\/some\/remote\/directory\/foobar.txt \n\\your_username@rh2.edu:\/some\/remote\/directory\/ <\/code><\/pre>\n<p>Copying the files &#8220;foo.txt&#8221; and &#8220;bar.txt&#8221; from the local host to your home directory on the remote host<\/p>\n<pre><code>scp foo.txt bar.txt your_username@remotehost.edu:~ <\/code><\/pre>\n<p>Copy multiple files from the remote host to your current directory on the local host<\/p>\n<pre><code>scp your_username@remotehost.edu:\/some\/remote\/directory\/\\{a,b,c\\} . <\/code><\/pre>\n<pre><code>scp your_username@remotehost.edu:~\/\\{foo.txt,bar.txt\\} . <\/code><\/pre>\n<p>scp Performance <\/p>\n<p>By default scp uses the Triple-DES cipher to encrypt the data being sent. Using the Blowfish cipher has been shown to increase speed. This can be done by using option -c blowfish in the command line.<\/p>\n<pre><code>scp -c blowfish some_file your_username@remotehost.edu:~ <\/code><\/pre>\n<p>It is often suggested that the -C option for compression should also be used to increase speed. The effect of compression, however, will only significantly increase speed if your connection is very slow. Otherwise it may just be adding extra burden to the CPU. An example of using blowfish and compression:<\/p>\n<pre><code>scp -c blowfish -C local_file your_username@remotehost.edu:~ <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>What is Secure Copy? scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh. Examples Copy the file &#8220;foobar.txt&#8221; from a remote host to the local host scp your_username@remotehost.edu:foobar.txt \/some\/local\/directory Copy the file &#8220;foobar.txt&#8221; from&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,9],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","hentry","category-cheatsheets","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Syntax for Secure Copy (scp) - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Syntax for Secure Copy (scp) - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"What is Secure Copy? scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh. Examples Copy the file &#8220;foobar.txt&#8221; from a remote host to the local host scp your_username@remotehost.edu:foobar.txt \/some\/local\/directory Copy the file &#8220;foobar.txt&#8221; from... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2009-05-31T08:31:53+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Syntax for Secure Copy (scp)\",\"datePublished\":\"2009-05-31T08:31:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/\"},\"wordCount\":220,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"Cheat Sheets\",\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/\",\"name\":\"Syntax for Secure Copy (scp) - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2009-05-31T08:31:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/syntax-for-secure-copy-scp\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Syntax for Secure Copy (scp)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Syntax for Secure Copy (scp) - Linux Shtuff","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/","og_locale":"en_US","og_type":"article","og_title":"Syntax for Secure Copy (scp) - Linux Shtuff","og_description":"What is Secure Copy? scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh. Examples Copy the file &#8220;foobar.txt&#8221; from a remote host to the local host scp your_username@remotehost.edu:foobar.txt \/some\/local\/directory Copy the file &#8220;foobar.txt&#8221; from... Read More","og_url":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2009-05-31T08:31:53+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Syntax for Secure Copy (scp)","datePublished":"2009-05-31T08:31:53+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/"},"wordCount":220,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["Cheat Sheets","General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/","url":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/","name":"Syntax for Secure Copy (scp) - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2009-05-31T08:31:53+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/syntax-for-secure-copy-scp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Syntax for Secure Copy (scp)"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}