{"id":30217,"date":"2021-01-18T03:40:05","date_gmt":"2021-01-17T19:40:05","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&#038;p=30217"},"modified":"2023-01-18T11:25:20","modified_gmt":"2023-01-18T03:25:20","slug":"how-to-securely-transfer-files-via-rsync-and-ssh-on-linux","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/how-to-securely-transfer-files-via-rsync-and-ssh-on-linux","title":{"rendered":"HOW TO: Securely Transfer Files via rsync and SSH on Linux"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"30217\" class=\"elementor elementor-30217\" data-elementor-post-type=\"kb\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-d979a8f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d979a8f\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-abc4a20\" data-id=\"abc4a20\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9be595b elementor-widget elementor-widget-heading\" data-id=\"9be595b\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-medium\">HOW TO: Securely Transfer Files via rsync and SSH on Linux\n<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4684733 elementor-widget elementor-widget-text-editor\" data-id=\"4684733\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>By reading this article, you will learn about transferring files securely via rsync and SSH on <a href=\"https:\/\/www.casbay.com\/vps-hosting-malaysia\">Linux Server<\/a>. Below are the steps to follow:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8dc779d elementor-widget elementor-widget-heading\" data-id=\"8dc779d\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">1) Securely\u00a0Download From\u00a0a Server<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-37033b5 elementor-widget elementor-widget-heading\" data-id=\"37033b5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-medium\">i) Standard SSH Port:<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-38042b5 elementor-widget elementor-widget-text-editor\" data-id=\"38042b5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><code>rsync -avHe ssh\u00a0<em>user<\/em>@<em>server<\/em>:<em>\/path\/to\/file<\/em>\u00a0<em>\/home\/user\/path\/to\/file<\/em><\/code><\/p><ul><li><strong>user<\/strong>: The username of the remote user through which you\u2019ll be logging into the target (remote) server.<\/li><li><strong>server<\/strong>: The hostname or IP address of the target (remote) server.<\/li><li><strong>\/path\/to\/file<\/strong>: The path to the file that needs to be downloaded from the target (remote) server. Besides, <em>file<\/em>\u00a0is the file name.<\/li><li><strong>\/home\/user\/path\/to\/file<\/strong>: The local path where you would like to store the file that is downloaded from the target (remote) server. <em>File<\/em>\u00a0is the file name.<\/li><\/ul><p><em>Example:<\/em><\/p><p><code>rsync -avHe ssh\u00a0adam@web01.adamsserver.com:\/home\/adam\/testfile1 \/home\/localuser\/testfile1<\/code><code><\/code><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c1807cc elementor-widget elementor-widget-heading\" data-id=\"c1807cc\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-medium\">ii) Alternate SSH Port:<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f66e2a2 elementor-widget elementor-widget-text-editor\" data-id=\"f66e2a2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><code><\/code><code>rsync -avHPe \"ssh -p<em>PORTNUMBER<\/em>\"\u00a0<em>user<\/em>@<em>server<\/em>:<em>\/path\/to\/file<\/em>\u00a0<em>\/home\/user\/path\/to\/file<\/em><\/code><\/p><ul><li><strong>PORTNUMBER<\/strong>: The port number for SSH on the target (remote) server.<\/li><li><strong>user<\/strong>: The username of the remote user through which you\u2019ll be logging into the target (remote) server.<\/li><li><strong>server<\/strong>: The hostname or IP address of the target (remote) server.<\/li><li><strong>\/path\/to\/file<\/strong>: The path to the file that needs to download from the target (remote) server, where\u00a0<em>file<\/em>\u00a0is the file name.<\/li><li><strong>\/home\/user\/path\/to\/file<\/strong>: The local path where you would like to store the file that is download from the target (remote) server, where\u00a0<em>file<\/em>\u00a0is the file name.<\/li><\/ul><p><em>Example:<\/em><\/p><p><code>rsync -avHPe \"ssh -p1337\"\u00a0adam@web01.adamsserver.com:\/home\/adam\/testfile1 \/home\/localuser\/testfile1<\/code><code><\/code><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-851655d elementor-widget elementor-widget-heading\" data-id=\"851655d\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">2) Securely\u00a0Upload To\u00a0a Server<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ecd7cb9 elementor-widget elementor-widget-heading\" data-id=\"ecd7cb9\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-medium\">i) Standard SSH Port:<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1a6c6b8 elementor-widget elementor-widget-text-editor\" data-id=\"1a6c6b8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><code>rsync -avH\u00a0<em>\/home\/user\/path\/to\/file<\/em>\u00a0-e ssh\u00a0<em>user<\/em>@<em>server<\/em>:<em>\/path\/to\/file<\/em><\/code><\/p><ul><li><strong>\/home\/user\/path\/to\/file<\/strong>: The local path where the file that will be uploaded to the target (remote) server exists, where\u00a0<em>file<\/em>\u00a0is the file name.<\/li><li><strong>user<\/strong>: The username of the remote user through which you\u2019ll be logging into the target (remote) server.<\/li><li><strong>server<\/strong>: The hostname or IP address of the target (remote) server.<\/li><li><strong>\/path\/to\/file<\/strong>: The remote path for the file that will be uploaded to the target (remote) server, where\u00a0<em>file<\/em>\u00a0is the file name.<\/li><\/ul><p><em>Example:<\/em><\/p><p><code>rsync -avH \/home\/localuser\/testfile1 -e ssh\u00a0adam@web01.adamsserver.com:\/home\/adam\/testfile1<\/code><code><\/code><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-332e9d0 elementor-widget elementor-widget-heading\" data-id=\"332e9d0\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-medium\">ii) Alternate SSH Port:<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b5a18f1 elementor-widget elementor-widget-text-editor\" data-id=\"b5a18f1\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><code>rsync -avHPe \"ssh -p<em>PORTNUMBER<\/em>\"\u00a0<em>\/home\/user\/path\/to\/file<\/em>\u00a0-e ssh\u00a0<em>user<\/em>@<em>server<\/em>:<em>\/path\/to\/file<\/em><\/code><\/p><ul><li><strong>PORTNUMBER<\/strong>: The port number for SSH on the target (remote) server.<\/li><li><strong>\/home\/user\/path\/to\/file<\/strong>: The local path where the file that will be uploaded to the target (remote) server exists, where\u00a0<em>file<\/em>\u00a0is the file name.<\/li><li><strong>user<\/strong>: The username of the remote user through which you\u2019ll be logging into the target (remote) server.<\/li><li><strong>server<\/strong>: The hostname or IP address of the target (remote) server.<\/li><li><strong>\/path\/to\/file<\/strong>: The remote path for the file that will be uploaded to the target (remote) server, where\u00a0<em>file<\/em>\u00a0is the file name.<\/li><\/ul><p><em>Example:<\/em><\/p><p><code>rsync -avHPe \"ssh -pPORTNUMBER\" \/home\/localuser\/testfile1 -e ssh\u00a0adam@web01.adamsserver.com:\/home\/adam\/testfile1<\/code><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b093775 elementor-widget elementor-widget-text-editor\" data-id=\"b093775\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>You have just learned about <em>how to securely transfer file via rsync and SSH on Linux<\/em>. For other articles from the similar topic, you can check out our <a href=\"https:\/\/www.casbay.com\/guide\/kb\/how-to-securely-transfer-files-via-rsync-and-ssh-on-linux\">Knowledge Base<\/a> to find out.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>HOW TO: Securely Transfer Files via rsync and SSH on Linux By reading this article, you will learn about transferring files securely via rsync and SSH on Linux Server. Below are the steps to follow: 1) Securely\u00a0Download From\u00a0a Server i) Standard SSH Port: rsync -avHe ssh\u00a0user@server:\/path\/to\/file\u00a0\/home\/user\/path\/to\/file user: The username of the remote user through which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[110],"kbtag":[106,105],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30217"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=30217"}],"version-history":[{"count":6,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30217\/revisions"}],"predecessor-version":[{"id":38209,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30217\/revisions\/38209"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=30217"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=30217"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=30217"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=30217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}