<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>glow.li: 2015</title>
        <description>A blog by glow.</description>
        <link>https://glow.li/tags/2015.xml</link>
        <atom:link href="https://glow.li/tags/2015.xml" rel="self" type="application/rss+xml"/>
        <generator>Glow.li Builder</generator>
            <item>
        <title>disk0s2 i/o error on Christmas Eve.</title>
        <description>&lt;p&gt;disk0s2 i/o error on Christmas Eve.&lt;/p&gt;</description>
    <pubDate>Thu, 24 Dec 2015 18:47:22 +0000</pubDate>
    <link>https://glow.li/posts/short-99e3f-disk0s2_io_error_on_Christmas_Eve./</link>
    <guid isPermaLink="false">1450982842</guid>
</item>

<item>
        <title>Run an SSH server on your Android with Termux</title>
        <description>&lt;p&gt;With the brilliant &lt;a href="https://termux.com/"&gt;Termux&lt;/a&gt; terminal emulator app you can run an SSH server on your Android.&lt;/p&gt;
&lt;p&gt;Previously I used SSHDroid (which is no longer available) to achieve this, but with Termux is much nicer because you have access to a working package manager.&lt;/p&gt;
&lt;h2 id="Run+the+service" name="Run+the+service"&gt;&lt;a class="hash-link" href="#Run+the+service"&gt;Run the service&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You need to install the OpenSSH package&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    apt install openssh&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and use following command to start the ssh server.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    sshd&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And there you go. Your ssh service is now running on port 8022.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ssh localhost -p 8022&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id="Adding+your+Public+key" name="Adding+your+Public+key"&gt;&lt;a class="hash-link" href="#Adding+your+Public+key"&gt;Adding your Public key&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can't do password authentication in Termux, therefore you need to put your OpenSSH public key into the ~/.ssh/authorized_keys file.&lt;/p&gt;
&lt;p&gt;This file will need to be created and permissions set to 600.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    touch ~/.ssh/authorized_keys
    # Set Permissions to the file
    chmod 600 ~/.ssh/authorized_keys
    # Make sure the folder .ssh folder has the correct permissions
    chmod 700 ~/.ssh&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you do not have a OpenSSH key pair yet, you can generate one with the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ssh-keygen&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You may or may not enter a passphrase and if you don't specify otherwise, your key pair will have been saved under ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub. You can then add it to the ~/.ssh/authorized_keys with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    cat ~/.ssh/id_rsa.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you can test it by connecting to your ssh service&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    # -i $PATH_TO_FILE/filename is only required if the id_rsa file is not ~/.ssh/id_rsa
    ssh localhost -p 8022 -i %PATH_TO_KEY-FILE%/%NAME_OF_KEY%&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can now use your private key (~/.ssh/id_rsa) to login to your Termux SSH Server. Simply copy it to your computer (by copying it to internal storage first &lt;code&gt;cp ~/.ssh/id_rsa /sdcard&lt;/code&gt;) and use it in your ssh client.&lt;/p&gt;
&lt;h3 id="OpenSSH" name="OpenSSH"&gt;&lt;a class="hash-link" href="#OpenSSH"&gt;OpenSSH&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you're using OpenSSH (on Linux or Cygwin) you can use it directly:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    # -i $PATH_TO_FILE/filename is only required if the id_rsa file is not ~/.ssh/id_rsa
    ssh $IP -p 8022 -i %PATH_TO_KEY-FILE%/%NAME_OF_KEY%&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="PuTTY" name="PuTTY"&gt;&lt;a class="hash-link" href="#PuTTY"&gt;PuTTY&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;If you're using PuTTY you will need to convert it to the PuTTY Private Key format first.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download and run &lt;a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html"&gt;PuTTYgen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Load the private key (id_rsa)&lt;/li&gt;
&lt;li&gt;Save the private key as a *.ppk file.&lt;/li&gt;
&lt;li&gt;Download and run &lt;a href="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html"&gt;PuTTY &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Enter the IP address of your Android device and use port 8022&lt;/li&gt;
&lt;li&gt;Under Connection&amp;gt;SSH&amp;gt;Auth you can browse for the *.pkk file&lt;/li&gt;
&lt;li&gt;Click open&lt;/li&gt;
&lt;li&gt;You can leave "login as:" blank&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You should now be connected to your Android device via SSH.&lt;/p&gt;
&lt;h3 id="If+it+still+doesn%27t+work" name="If+it+still+doesn%27t+work"&gt;&lt;a class="hash-link" href="#If+it+still+doesn%27t+work"&gt;If it still doesn't work&lt;/a&gt;&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;    killall sshd
    sshd -d&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If it is still prompts you for a password you can enter sshd's debug mode with the above command and see exactly why your key has been rejected. The reason usually are bad permission on either your home directory, your .ssh folder or your authorized_keys file.&lt;/p&gt;
&lt;p&gt;The correct permissions are:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    chmod 700 ~
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/*&lt;/code&gt;&lt;/pre&gt;
&lt;hr &gt;
&lt;p&gt;I hope in the future Termux will allow us to register sshd as a proper service which would automatically start on system boot. Right now I have the 'sshd' command in my .bashrc file and I am using &lt;a href="https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm"&gt;Tasker &lt;/a&gt;to launch Termux after boot. You can also use the &lt;a href="https://play.google.com/store/apps/details?id=com.termux.widget&amp;amp;hl=en"&gt;Termux widget&lt;/a&gt; to quickly start sshd with a widget.&lt;/p&gt;
&lt;p&gt;See also: &lt;a href="https://glow.li/posts/access-termux-via-usb/"&gt;Access the SSH server via USB instead of WiFi&lt;/a&gt;&lt;/p&gt;</description>
    <pubDate>Fri, 06 Nov 2015 17:48:05 +0000</pubDate>
    <link>https://glow.li/posts/run-an-ssh-server-on-your-android-with-termux/</link>
    <guid isPermaLink="false">1446832085</guid>
</item>

<item>
        <title>Display Swatch Internet Time (beats) in Zooper</title>
        <description>&lt;p&gt;&lt;a href="https://glow.li/media/images/big/beat-screenshot.webp?chash=Iebu8ce7ec"&gt;&lt;img src="https://glow.li/media/images/beat-screenshot.webp?chash=Iebu85149a" alt="beat screenshot" title="beat screenshot" loading="lazy" sizes="(max-width:800px) 100vw, (max-width:800px) 100vw, (max-width:1000px) 80vw, (max-width:1200px) 67vw, (max-width:1400px) 58vw, (max-width:1600px) 50vw, (max-width:1800px) 45vw, (max-width:2000px) 40vw, (max-width:2200px) 37vw, (max-width:2400px) 34vw, (max-width:2600px) 31vw, (max-width:2800px) 29vw, 1500px" srcset="https://glow.li/media/images/beat-screenshot.webp?chash=Iebu85149a 1500w, https://glow.li/media/images/1200/beat-screenshot.webp?chash=Iebu85130c 1200w, https://glow.li/media/images/1000/beat-screenshot.webp?chash=Iebu85130c 1000w, https://glow.li/media/images/800/beat-screenshot.webp?chash=Iebu85130c 800w, https://glow.li/media/images/700/beat-screenshot.webp?chash=Iebu85130c 700w, https://glow.li/media/images/600/beat-screenshot.webp?chash=Iebu85130c 600w, https://glow.li/media/images/500/beat-screenshot.webp?chash=Iebu81013e 500w, https://glow.li/media/images/400/beat-screenshot.webp?chash=Iebu89e1aa 400w, https://glow.li/media/images/300/beat-screenshot.webp?chash=Iebu8d636d 300w, https://glow.li/media/images/200/beat-screenshot.webp?chash=Iebu84c7b9 200w, https://glow.li/media/images/100/beat-screenshot.webp?chash=Iebu894560 100w" &gt;&lt;/a&gt;
Did you ever want Zooper to display Time in &lt;a href="https://en.wikipedia.org/wiki/Swatch_Internet_Time"&gt;.beats&lt;/a&gt;? Probably not. Here's how anyway:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;@$(floor(((#Dss#)+(#Dmm#*60)+((#DH#+1)*3600))/86.4))$&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This does the math. Just add a Text or Rich Text module, "Edit text manually" and insert this.&lt;/p&gt;
&lt;p&gt;You will have to also tap "Override widget Locality" add a location, enter any city and manually set the timezone to UTC. This is because it Swatch Internet Time doesn't have time zones but can be calculated from Biel Meantime (BMT). @0 is midnight in Biel, where the Swatch headquarters is located.&lt;/p&gt;
&lt;p&gt;You can also download this as a template: &lt;a href="https://glow.li/media/files/Swatch_Internet_Time.zw"&gt;Swatch Internet Time.zw&lt;/a&gt;&lt;/p&gt;</description>
    <pubDate>Fri, 30 Oct 2015 18:17:50 +0000</pubDate>
    <link>https://glow.li/posts/beats-with-zooper/</link>
    <guid isPermaLink="false">1446229070</guid>
</item>

<item>
        <title>authorized_keys must be 600.</title>
        <description>&lt;p&gt;authorized_keys must be 600.&lt;/p&gt;</description>
    <pubDate>Tue, 20 Oct 2015 15:09:11 +0000</pubDate>
    <link>https://glow.li/posts/short-8aaea-authorized_keys_must_be_600./</link>
    <guid isPermaLink="false">1445353751</guid>
</item>

<item>
        <title>Super blood moon</title>
        <description>&lt;p&gt;&lt;a href="https://glow.li/media/images/big/moon2.webp?chash=Iebu865bcf"&gt;&lt;img src="https://glow.li/media/images/moon2.webp?chash=Iebu852182" alt="Super blood moon" title="Super blood moon" loading="lazy" sizes="(max-width:800px) 100vw, (max-width:800px) 100vw, (max-width:1000px) 80vw, (max-width:1200px) 67vw, (max-width:1400px) 58vw, (max-width:1600px) 50vw, (max-width:1800px) 45vw, (max-width:2000px) 40vw, (max-width:2200px) 37vw, (max-width:2400px) 34vw, (max-width:2600px) 31vw, (max-width:2800px) 29vw, 1500px" srcset="https://glow.li/media/images/moon2.webp?chash=Iebu852182 1500w, https://glow.li/media/images/1200/moon2.webp?chash=Iebu89ffdf 1200w, https://glow.li/media/images/1000/moon2.webp?chash=Iebu8dd86e 1000w, https://glow.li/media/images/800/moon2.webp?chash=Iebu881e21 800w, https://glow.li/media/images/700/moon2.webp?chash=Iebu83fdc3 700w, https://glow.li/media/images/600/moon2.webp?chash=Iebu85f6aa 600w, https://glow.li/media/images/500/moon2.webp?chash=Iebu865361 500w, https://glow.li/media/images/400/moon2.webp?chash=Iebu84f93a 400w, https://glow.li/media/images/300/moon2.webp?chash=Iebu8589b7 300w, https://glow.li/media/images/200/moon2.webp?chash=Iebu8efcfd 200w, https://glow.li/media/images/100/moon2.webp?chash=Iebu8927a7 100w" &gt;&lt;/a&gt;
The long awaited lunar eclipse finally happened. So I got up at 4:00 and went out and snapped some photos.&lt;/p&gt;
&lt;p&gt;Saturdays test photos were useless. It took completely different settings to capture the eclipse.&lt;/p&gt;
&lt;p&gt;The weather was perfect. The night was crystal clear so even if the annoying farmers and their stupid light machines were driving around the fields no light was back scattered by mist.&lt;/p&gt;
&lt;hr &gt;
&lt;p&gt;This was my second time trying to photograph a lunar eclipse. The first time was in 2011 when I just got the camera and was over lake Geneva.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://glow.li/posts/lunar-eclipse-over-lage-geneva/"&gt;Lunar eclipse over Lake Geneva&lt;/a&gt;&lt;/p&gt;</description>
    <pubDate>Mon, 28 Sep 2015 05:52:25 +0000</pubDate>
    <link>https://glow.li/posts/super-blood-moon/</link>
    <guid isPermaLink="false">1443419545</guid>
</item>

<item>
        <title>Full Moon</title>
        <description>&lt;p&gt;&lt;a href="https://glow.li/media/images/big/moon.webp?chash=Iebu892adf"&gt;&lt;img src="https://glow.li/media/images/moon.webp?chash=Iebu8b3e2f" alt="Moon" title="Moon" loading="lazy" sizes="(max-width:800px) 100vw, (max-width:800px) 100vw, (max-width:1000px) 80vw, (max-width:1200px) 67vw, (max-width:1400px) 58vw, (max-width:1600px) 50vw, (max-width:1800px) 45vw, (max-width:2000px) 40vw, (max-width:2200px) 37vw, (max-width:2400px) 34vw, (max-width:2600px) 31vw, (max-width:2800px) 29vw, 1500px" srcset="https://glow.li/media/images/moon.webp?chash=Iebu8b3e2f 1500w, https://glow.li/media/images/1200/moon.webp?chash=Iebu803e8d 1200w, https://glow.li/media/images/1000/moon.webp?chash=Iebu88e3b8 1000w, https://glow.li/media/images/800/moon.webp?chash=Iebu8d0b6d 800w, https://glow.li/media/images/700/moon.webp?chash=Iebu813764 700w, https://glow.li/media/images/600/moon.webp?chash=Iebu82954e 600w, https://glow.li/media/images/500/moon.webp?chash=Iebu81d776 500w, https://glow.li/media/images/400/moon.webp?chash=Iebu88ed89 400w, https://glow.li/media/images/300/moon.webp?chash=Iebu81a9c4 300w, https://glow.li/media/images/200/moon.webp?chash=Iebu8c86cc 200w, https://glow.li/media/images/100/moon.webp?chash=Iebu83e991 100w" &gt;&lt;/a&gt;
In preparation for Mondays lunar eclipse I went out on Saturday and did some photos of the full moon. Here's the best one.&lt;/p&gt;</description>
    <pubDate>Mon, 28 Sep 2015 05:31:26 +0000</pubDate>
    <link>https://glow.li/posts/full-moon/</link>
    <guid isPermaLink="false">1443418286</guid>
</item>

<item>
        <title>The cat just ate a huge spider. I guess they just earned their share of cat food for the month.</title>
        <description>&lt;p&gt;The cat just ate a huge spider. I guess they just earned their share of cat food for the month.&lt;/p&gt;</description>
    <pubDate>Thu, 10 Sep 2015 18:00:57 +0000</pubDate>
    <link>https://glow.li/posts/short-752a5-The_cat_just_ate_a_huge_spider._I_guess_he_just_earned_his/</link>
    <guid isPermaLink="false">1441908057</guid>
</item>

<item>
        <title>Phuket</title>
        <description>&lt;p&gt;&lt;a href="https://glow.li/media/images/big/phuket.webp?chash=Iebu878bee"&gt;&lt;img src="https://glow.li/media/images/phuket.webp?chash=Iebu8a424d" alt="Photo in Phuket" title="Photo in Phuket" loading="lazy" sizes="(max-width:800px) 100vw, (max-width:800px) 100vw, (max-width:1000px) 80vw, (max-width:1200px) 67vw, (max-width:1400px) 58vw, (max-width:1600px) 50vw, (max-width:1800px) 45vw, (max-width:2000px) 40vw, (max-width:2200px) 37vw, (max-width:2400px) 34vw, (max-width:2600px) 31vw, (max-width:2800px) 29vw, 1500px" srcset="https://glow.li/media/images/phuket.webp?chash=Iebu8a424d 1500w, https://glow.li/media/images/1200/phuket.webp?chash=Iebu893694 1200w, https://glow.li/media/images/1000/phuket.webp?chash=Iebu8d3fa8 1000w, https://glow.li/media/images/800/phuket.webp?chash=Iebu868f87 800w, https://glow.li/media/images/700/phuket.webp?chash=Iebu86e8e5 700w, https://glow.li/media/images/600/phuket.webp?chash=Iebu8df884 600w, https://glow.li/media/images/500/phuket.webp?chash=Iebu8a68a9 500w, https://glow.li/media/images/400/phuket.webp?chash=Iebu86ebb8 400w, https://glow.li/media/images/300/phuket.webp?chash=Iebu8d4711 300w, https://glow.li/media/images/200/phuket.webp?chash=Iebu8df26f 200w, https://glow.li/media/images/100/phuket.webp?chash=Iebu8af257 100w" &gt;&lt;/a&gt;&lt;/p&gt;</description>
    <pubDate>Sat, 25 Jul 2015 07:24:59 +0000</pubDate>
    <link>https://glow.li/posts/phuket/</link>
    <guid isPermaLink="false">1437809099</guid>
</item>

    </channel>
</rss>

