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

<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>PHP, the universe and all the rest - tipstricks</title>
    <link>http://www.php-groupies.de/blogs/</link>
    <description>PHP Groupie since 1999 </description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.0.3 - http://www.s9y.org/</generator>
    <pubDate>Mon, 04 Jun 2012 03:52:02 GMT</pubDate>

    <image>
        <url>http://www.php-groupies.de/blogs/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: PHP, the universe and all the rest - tipstricks - PHP Groupie since 1999 </title>
        <link>http://www.php-groupies.de/blogs/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Falling in love with MOSH  (on top of SSH)</title>
    <link>http://www.php-groupies.de/blogs/archives/51-Falling-in-love-with-MOSH-on-top-of-SSH.html</link>
            <category>tipstricks</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/51-Falling-in-love-with-MOSH-on-top-of-SSH.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=51</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=51</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;If you&lt;/p&gt;


&lt;ul&gt;
    &lt;li&gt;use interactive &lt;b&gt;ssh&lt;/b&gt; sessions a lot&lt;/li&gt;
    &lt;li&gt;from a laptop&lt;/li&gt;
    &lt;li&gt;that you may put to suspend every once in a while&lt;/li&gt;
    &lt;li&gt;or even roam between different networks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;then you should definitely have a look at &lt;a href=&quot;http://mosh.mit.edu/&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;Mosh: the mobile shell&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Mosh&lt;/b&gt; creates a remote terminal session on another machine similar to what &lt;b&gt;ssh&lt;/b&gt; does, but different.&lt;br /&gt;
Think of &lt;b&gt;ssh&lt;/b&gt; and &lt;b&gt;screen&lt;/b&gt; combined for persistent sessions, combined with automatic reconnects, even if your client IP address changes and you almost have it.&lt;/p&gt;

&lt;p&gt;E.g. previously i was using &lt;b&gt;ssh&lt;/b&gt;, &lt;b&gt;screen&lt;/b&gt; and &lt;b&gt;irssi&lt;/b&gt; to connect to our internal IRC server using the following steps:&lt;/p&gt;


&lt;ul&gt;
    &lt;li&gt;&lt;b&gt;ssh irc&lt;/b&gt; to connect to our login machine (&lt;b&gt;irc&lt;/b&gt; actually referring to a host entry in my &lt;b&gt;.ssh/config&lt;/b&gt; that has the full host name, user name and key information to use)&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;screen -xr irc&lt;/b&gt; to reconnect to my screen session running irssi (always running so that i have full backlogs)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now with &lt;b&gt;mosh&lt;/b&gt; i can instead use the simpler one liner (or actually a small shell script containing it):&lt;/p&gt;


&lt;ul&gt;
    &lt;li&gt; mosh irc -- screen -xr irc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Mosh then first uses &lt;b&gt;ssh&lt;/b&gt; to start a session server process on the remote site, so i can still use my host entry from my ssh config file. Next it starts to communicate with this remote server using an AES encrypted UDP protocol. So the session is not bound to a TCP stream as with SSH, and it will not break if that stream is lost as there isn&#039;t one to begin with. And instead of identifying the client by IP and port number the AES session is used for this, so the mosh server does not mind if the clients IP suddenly changes.&lt;/p&gt;

&lt;p&gt;So a mosh session survives even if you move the client device to a different network, and as UDP is connection-less the session will even survive extended amounts of client downtime.&lt;/p&gt;

&lt;p&gt;Now when e.g. moving from my home office to the coffee-shop-with-WLAN-down-the-street i simply put my laptop to sleep (suspend), and when i open it up again there it wakes up again and even though it had been disconnected for ~10min and now has a totally different IP from a different network i can continue to work with my open mosh sessions right away.&lt;/p&gt;

&lt;p&gt;Also when on the train with only a G3 connection that can go up and down by the minute i don&#039;t have to bother with remote session disconnects anymore.&lt;/p&gt;

&lt;p&gt;But there&#039;s even more to it that makes it a superior ssh for interactive sessions: Mosh does not simply stream through all output, it is more like VNC for text mode as it maintains a model of the screen states on the server and client sides and tries to keep these in sync. So if you e.g. start something that produces &lt;b&gt;a lot&lt;/b&gt; of output and then terminate it with CTRL-C you don&#039;t have to wait for all the output to stream by ... you&#039;ll get your shell prompt back almost immediately instead.&lt;/p&gt;

&lt;p&gt;And one last goodie: if you&#039;ve ever used ssh over a slow line or one with very high latencies you probably know the &amp;quot;can type faster than the characters appear on the screen&amp;quot; effect and how confusing that can be. Here mosh upon detecting a slow link will enter a mode where it tries to predict where the characters you just typed are going to end up on the screen (including a simple cursor key understanding) and will show them as underlined while waiting for the server response. Once that arrived it will replace its local prediction with the actual screen contents from the server session. It may not always guess right, but you&#039;ll at least see what you&#039;re typing right away &lt;img src=&quot;http://www.php-groupies.de/blogs/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now i&#039;m desperately waiting for an Android client for this .... &lt;img src=&quot;http://www.php-groupies.de/blogs/templates/default/img/emoticons/wink.png&quot; alt=&quot;;-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;

 
    </content:encoded>

    <pubDate>Mon, 04 Jun 2012 05:52:02 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/51-guid.html</guid>
    
</item>
<item>
    <title>Little things learned</title>
    <link>http://www.php-groupies.de/blogs/archives/24-Little-things-learned.html</link>
            <category>tipstricks</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/24-Little-things-learned.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=24</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=24</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;I just came back from this years &lt;a href=&quot;http://froscon.de&quot; onclick=&quot;window.open(this.href, &#039;_blank&#039;); return false;&quot;&gt;FROSCON&lt;/a&gt; event and even though i don&#039;t think that i did discover any new big things there were two small tools that i wasn&#039;t aware of so far which i&#039;ll probably use on a rather regular basis in the future.&lt;/p&gt;

 &lt;br /&gt;&lt;a href=&quot;http://www.php-groupies.de/blogs/archives/24-Little-things-learned.html#extended&quot;&gt;Continue reading &quot;Little things learned&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sun, 26 Aug 2007 23:01:33 +0200</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/24-guid.html</guid>
    
</item>
<item>
    <title>The $PATH is the reward</title>
    <link>http://www.php-groupies.de/blogs/archives/1-The-PATH-is-the-reward.html</link>
            <category>tipstricks</category>
    
    <comments>http://www.php-groupies.de/blogs/archives/1-The-PATH-is-the-reward.html#comments</comments>
    <wfw:comment>http://www.php-groupies.de/blogs/wfwcomment.php?cid=1</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://www.php-groupies.de/blogs/rss.php?version=2.0&amp;type=comments&amp;cid=1</wfw:commentRss>
    

    <author>nospam@example.com (Hartmut Holzgraefe)</author>
    <content:encoded>
    &lt;p&gt;Has this ever happened to you? (i bet it has):&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;  $ export PATH=$PAHT:/usr/local/foo/bin
  $ ls
  ls: command not found&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It is so easy to have a typo in that PATH assignment, and so hard to recover from it (esp. when not using X11).&lt;/p&gt;

 &lt;br /&gt;&lt;a href=&quot;http://www.php-groupies.de/blogs/archives/1-The-PATH-is-the-reward.html#extended&quot;&gt;Continue reading &quot;The $PATH is the reward&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 15 Feb 2006 13:46:43 +0100</pubDate>
    <guid isPermaLink="false">http://www.php-groupies.de/blogs/archives/1-guid.html</guid>
    
</item>

</channel>
</rss>