{"id":3934,"date":"2018-11-21T05:43:21","date_gmt":"2018-11-21T05:43:21","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=3934"},"modified":"2018-12-07T02:59:33","modified_gmt":"2018-12-07T02:59:33","slug":"tool-to-securely-transfer-files-between-linux-computers","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/11\/21\/tool-to-securely-transfer-files-between-linux-computers\/","title":{"rendered":"Tool to Securely Transfer Files Between Linux Computers"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/DCP-tool-securely-transfer-files-linux.png\" alt=\"DCP tool securely transfer files linux\" width=\"713\" height=\"341\" \/><\/p>\n<p>Transfer files remotely has for a long time been a reserve of rsync and SCP protocols. In this article, we will take a look at how you can transfer files between Linux computers using dcp tool. dcp tool is a handy tool that copies files between host machines in a network using the <a href=\"https:\/\/datproject.org\/\" target=\"_blank\" rel=\"noopener\">DAT network<\/a>. In this guide, we will try to remotely copy files between two Ubuntu\/Debian Systems.<\/p>\n<h2>System SetUp<\/h2>\n<p>We are going to demonstrate the remote copying of files using two Debian hosts:<\/p>\n<ol>\n<li>Host A &#8211; IP 10.200.50.50 ( This system will host files to be sent remotely to another host system)<\/li>\n<li>Host B &#8211; IP 10.200.50.51 (This will be the System where files will be transferred\/copied to)<\/li>\n<\/ol>\n<h2>How dcp works<\/h2>\n<p><a href=\"https:\/\/github.com\/tom-james-watson\/dat-cp\" target=\"_blank\" rel=\"noopener\">Dcp tool<\/a> creates a dat archive for a specified group of files or directories. Using a generated public key, dcp allows you to download the said archive from the second host system. Data shared over the network is encrypted using the archive&#8217;s public key, so you don&#8217;t need to worry about the security of your data. Data will only be limited to those who have access to the key.<\/p>\n<h2>Software Prerequisites<\/h2>\n<p>To successfully install the dcp tool, the following software packages are required on both host systems<\/p>\n<ul>\n<li>NodeJS<\/li>\n<li>NPM<\/li>\n<\/ul>\n<h2>Installing NodeJS<\/h2>\n<p>To <a href=\"https:\/\/linoxide.com\/linux-how-to\/install-install-nodejs-linux\/\" target=\"_blank\" rel=\"noopener\">install NodeJS<\/a>, we are going to add Node.js PPA to our host machines. The PPA is provided by the Official Nodejs website. In addition, we are going to install the software-properties-common package.<\/p>\n<p>Log in to each of the systems and follow the steps below<\/p>\n<h3>Install software-properties-common package<\/h3>\n<p>Run the command below<\/p>\n<p># sudo apt-get install curl software-properties-common<\/p>\n<p>Sample Output<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/install-software-properties-common.png\" alt=\"remotely copy files using dcp\" width=\"640\" height=\"312\" \/><\/p>\n<h3>Next, Add the required PPA file to allow you to install Node.JS<\/h3>\n<p>Run the command below to <a href=\"https:\/\/linoxide.com\/ubuntu-how-to\/remove-add-ppa-ubuntu\/\" target=\"_blank\" rel=\"noopener\">add PPA<\/a><\/p>\n<p># curl -sL https:\/\/deb.nodesource.com\/setup_11.x | sudo bash &#8211;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/Installing-nodesource.png\" alt=\"\" width=\"643\" height=\"357\" \/><\/p>\n<p>Finally, let&#8217;s install the Node.JS package which will also come with NPM<\/p>\n<h3>Install Node.JS package<\/h3>\n<p># sudo apt-get install -y nodejs<\/p>\n<p>Sample Output<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/install-nodejs.png\" alt=\"\" width=\"645\" height=\"278\" \/><\/p>\n<h3>Verifying installation of Node.JS and NPM<\/h3>\n<p>To verify installation of Node.JS<\/p>\n<p># node -v<\/p>\n<p>To verify installation of NPM<\/p>\n<p># npm -v<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/Checking-version-of-node-npm.png\" alt=\"\" width=\"619\" height=\"69\" \/><\/p>\n<p>Now that we have our software prerequisites, let&#8217;s proceed and install dcp<\/p>\n<h2>Install dcp tool<\/h2>\n<p>To install the dcp tool run<\/p>\n<p>npm i -g dat-cp<\/p>\n<p>Sample output<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/dcp-install.png\" alt=\"\" width=\"716\" height=\"334\" \/><\/p>\n<p>To verify that all went OK, let&#8217;s check out the version of the dcp tool<\/p>\n<p>dcp &#8211;version<\/p>\n<p>OR<\/p>\n<p>dcp -V<\/p>\n<p>Output<\/p>\n<p>0.6.2<\/p>\n<p>Great! Let&#8217;s create a few files on our source system and try and send them over the network to the second host.<\/p>\n<p># touch file1.txt file2.txt file3.txt<\/p>\n<h2>How to remotely transfer\/copy files<\/h2>\n<p>To remotely copy the files to another host , run the following command<\/p>\n<p>dcp file1.txt file2.txt file3.txt<\/p>\n<p>This will generate a public key at the bottom as shown in cyan color.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/dcp-send-files-1-2-3.png\" alt=\"\" width=\"645\" height=\"196\" \/><\/p>\n<p>Copy the key and paste it on the remote server as shown<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/dcp-receive-files-1-2-3.png\" alt=\"\" width=\"852\" height=\"98\" \/><\/p>\n<p>Congratulations! You have successfully copied files from one host to another using the dcp tool.<\/p>\n<p>To find more information about the tool&#8217;s usage run<\/p>\n<p>dcp &#8211;help<\/p>\n<p>OR<\/p>\n<p>dcp -h<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linoxide.com\/wp-content\/uploads\/2018\/11\/dcp-help.png\" alt=\"\" width=\"582\" height=\"336\" \/><\/p>\n<p>That&#8217;s it for today guys. I hope you found this guide helpful. Feel free to comment and share. Thanks!<\/p>\n<h3>Read Also:<\/h3>\n<ul>\n<li><a href=\"https:\/\/linoxide.com\/how-tos\/rsync-copy\/\" target=\"_blank\" rel=\"noopener\">12 Common Linux Rsync Command Options in Linux with Examples<\/a><\/li>\n<li><a href=\"https:\/\/linoxide.com\/linux-how-to\/linux-rsync-examples-exclude-files-directories\/\" target=\"_blank\" rel=\"noopener\">10 Linux rsync Examples to Exclude Files\/Directories<\/a><\/li>\n<li><a href=\"https:\/\/linoxide.com\/how-tos\/scp-command-file-directory-transfer-linux\/\" target=\"_blank\" rel=\"noopener\">How to Use SCP Command for A File\/Directory Transfer in Linux<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/linoxide.com\/tools\/dcp-tool-securely-transfer-files-between-linux-computers\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Transfer files remotely has for a long time been a reserve of rsync and SCP protocols. In this article, we will take a look at how you can transfer files between Linux computers using dcp tool. dcp tool is a handy tool that copies files between host machines in a network using the DAT network. &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/11\/21\/tool-to-securely-transfer-files-between-linux-computers\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Tool to Securely Transfer Files Between Linux Computers&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3934","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/3934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=3934"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/3934\/revisions"}],"predecessor-version":[{"id":4679,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/3934\/revisions\/4679"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=3934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=3934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=3934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}