<?xml version="1.0" encoding="utf-8" ?>

<?xml-stylesheet type="text/xsl" href="/templates/2k11/rss.xsl" media="screen" ?>
<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    
    <title>Daniel Lange's blog (Entries tagged as sync)</title>
    <link>http://daniel-lange.com/</link>
    <description>agrep -pB IT /dev/life</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 2.6.0 - http://www.s9y.org/</generator>
    <pubDate>Wed, 16 Jul 2014 07:17:57 GMT</pubDate>

    <image>
    <url>//daniel-lange.com/uploads/Avatar_Blog_144_234.png</url>
    <title>RSS: Daniel Lange's blog - agrep -pB IT /dev/life</title>
    <link>http://daniel-lange.com/</link>
    <width>144</width>
    <height>234</height>
</image>

<item>
    <title>scp (secure copy) a file to the same path on a remote system</title>
    <link>http://daniel-lange.com/archives/95-scp-secure-copy-a-file-to-the-same-path-on-a-remote-system.html</link>
            <category>IT</category>
    
    <comments>http://daniel-lange.com/archives/95-scp-secure-copy-a-file-to-the-same-path-on-a-remote-system.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=95</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=95</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;I&#039;ve been copying files from one server to the symmetrical cluster partner a lot last week.&lt;/p&gt;

&lt;p&gt;It&#039;s always&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; scp /path/to/directory/file remote:/path/to/directory/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That gets boring after a while but does not really warrant setting up a full blown config management solution like salt, puppet or ansible.&lt;/p&gt;

&lt;p&gt;So here is &lt;a href=&quot;http://daniel-lange.com/software/scpover&quot; title=&quot;scpover script download&quot;&gt;scpover&lt;/a&gt;[1.5kB].&lt;/p&gt;

&lt;p&gt;It reduces the effort to&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; scpover /path/to/directory/file
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will copy &quot;file&quot; from &quot;/path/to/directory/&quot; into exactly the same directory on the remote cluster partner.
Which system to target is detected from the hostname of the local system and hard-coded into the script.&lt;/p&gt;

&lt;p&gt;Scpover can also take multiple filepaths on one command line so you can beam over a few related config files from multiple locations in one go.&lt;br /&gt;
Not an atomic change but at least all within a reasonably short timespan.&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;http://daniel-lange.com/archives/95-scp-secure-copy-a-file-to-the-same-path-on-a-remote-system.html#extended&quot;&gt;Continue reading &quot;scp (secure copy) a file to the same path on a remote system&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 16 Jul 2014 07:00:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/95-guid.html</guid>
    <category>bash</category>
<category>cluster</category>
<category>scp</category>
<category>script</category>
<category>ssh</category>
<category>sync</category>

</item>
<item>
    <title>Encrypting files with openssl for synchronization across the Internet</title>
    <link>http://daniel-lange.com/archives/84-Encrypting-files-with-openssl-for-synchronization-across-the-Internet.html</link>
            <category>Linux</category>
    
    <comments>http://daniel-lange.com/archives/84-Encrypting-files-with-openssl-for-synchronization-across-the-Internet.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=84</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;Well, shortly after I wrote about &lt;a href=&quot;http://daniel-lange.com/83-Encrypting-files-with-gpg-for-synchronization-across-the-Internet.html&quot;&gt;encrypting files with a keyfile / passphrase with gpg&lt;/a&gt; people asked about a solution with openssl.&lt;/p&gt;

&lt;p&gt;You should prefer to use the gpg version linked above, but if you can&#039;t, below is a script offering the same functionality with openssl.&lt;/p&gt;

&lt;p&gt;You basically call &lt;code&gt;crypt_openssl &amp;lt;file&amp;gt; [&amp;lt;files...&amp;gt;]&lt;/code&gt; to encrypt &lt;code&gt;file&lt;/code&gt; to &lt;code&gt;file.aes&lt;/code&gt; using the same keyfile as used in the gpg script (&lt;code&gt;~/.gnupg/mykey001&lt;/code&gt; per default).&lt;/p&gt;

&lt;p&gt;A simple &lt;code&gt;crypt_openssl -d &amp;lt;file.aes&amp;gt; [&amp;lt;files.aes...&amp;gt;]&lt;/code&gt; will restore the original files from the encrypted AES256 version that you can safely transfer over the Internet even using insecure channels.&lt;/p&gt;

&lt;p&gt;Please note that you should feed compressed data to &lt;code&gt;crypt_openssl&lt;/code&gt; whenever you can. So use preferably use it on &lt;code&gt;.zip&lt;/code&gt; or &lt;code&gt;.tar.gz&lt;/code&gt; files.&lt;/p&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;http://daniel-lange.com/archives/84-Encrypting-files-with-openssl-for-synchronization-across-the-Internet.html#extended&quot;&gt;Continue reading &quot;Encrypting files with openssl for synchronization across the Internet&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Mon, 23 Sep 2013 17:50:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/84-guid.html</guid>
    <category>bash</category>
<category>crypt</category>
<category>openssl</category>
<category>script</category>
<category>security</category>
<category>sync</category>

</item>
<item>
    <title>Encrypting files with gpg for synchronization across the Internet</title>
    <link>http://daniel-lange.com/archives/83-Encrypting-files-with-gpg-for-synchronization-across-the-Internet.html</link>
            <category>Linux</category>
    
    <comments>http://daniel-lange.com/archives/83-Encrypting-files-with-gpg-for-synchronization-across-the-Internet.html#comments</comments>
    <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=83</wfw:comment>

    <slash:comments>6</slash:comments>
    <wfw:commentRss>http://daniel-lange.com/rss.php?version=2.0&amp;type=comments&amp;cid=83</wfw:commentRss>
    

    <author>nospam@example.com (Daniel Lange)</author>
    <content:encoded>
    &lt;p&gt;Automatically transferring (syncing) files between multiple computers is easy these days. Dropbox, owncloud or &lt;a href=&quot;https://github.com/sickill/bitpocket&quot;&gt;bitpocket&lt;/a&gt; to name a few. You can imagine I use the latter (if you want a recommendation)&lt;sup id=&quot;fnref:1&quot;&gt;&lt;a href=&quot;#fn:1&quot; rel=&quot;footnote&quot;&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;In any case you want to encrypt what you send to be stored in &quot;the cloud&quot; even if it is just for a short time. There are many options how to encrypt the &quot;in flight&quot; data. Symmetric ciphers are probably the safest and most widely researched cryptography these days and easier to use than asymmetric key pairs in this context as well.&lt;/p&gt;

&lt;p&gt;Encryption is notoriously hard to implement correctly and worthless when the implementation is flawed. So I looked at &lt;a href=&quot;http://www.gnupg.org/&quot;&gt;gpg&lt;/a&gt;, a well known reference implementation, and was amazed that it can neither use a proper keyfile for symmetric encryption (you can just supply a passphrase via &lt;code&gt;--passphrase-file&lt;/code&gt;) nor does it handle multiple files on the command line consistently.
You can use &lt;code&gt;--multifile&lt;/code&gt; (wondering...why does a command need that at all?) with &lt;code&gt;--decrypt&lt;/code&gt; and &lt;code&gt;--encrypt&lt;/code&gt; (asymmetric public/private key pair encryption) but not with &lt;code&gt;--symmetric&lt;/code&gt; (symmetric shared key encryption). Duh!&lt;/p&gt;

&lt;p&gt;With a bit of scripting around the gpg shortcomings, you end up with &lt;code&gt;crypt_gpg&lt;/code&gt; that can nicely encrypt or decrypt multiple files (symmetric cipher) in one go.&lt;/p&gt;

&lt;div class=&quot;footnotes&quot;&gt;
&lt;hr /&gt;
&lt;ol&gt;

&lt;li id=&quot;fn:1&quot;&gt;
&lt;p&gt;Dropbox is closed source so it cannot be assessed for its security. Owncloud needs a thorough code review before I would dare to run it on my systems.&amp;#160;&lt;a href=&quot;#fnref:1&quot; rev=&quot;footnote&quot;&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;
&lt;/div&gt;
 &lt;a class=&quot;block_level&quot; href=&quot;http://daniel-lange.com/archives/83-Encrypting-files-with-gpg-for-synchronization-across-the-Internet.html#extended&quot;&gt;Continue reading &quot;Encrypting files with gpg for synchronization across the Internet&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Fri, 20 Sep 2013 16:00:00 +0000</pubDate>
    <guid isPermaLink="false">http://daniel-lange.com/archives/83-guid.html</guid>
    <category>bash</category>
<category>crypt</category>
<category>gpg</category>
<category>script</category>
<category>security</category>
<category>sync</category>

</item>

</channel>
</rss>
