Rearranging dir structure...

This commit is contained in:
Don Harper 2015-06-18 11:05:31 -05:00
parent 0be4a5f73a
commit 2696bf0516
126 changed files with 2 additions and 0 deletions

View file

@ -0,0 +1,27 @@
<html><body><h1>Making life easy over flaky links</h1>
<p>I tend to work over VPN, which we know can be flaky at times, Since I work on server, I spend a lot of time sshed into hosts. I was getting tired of the lost time having to restart what I was working on every time the VPN dropped (which could be as much as every 15 minutes on a bad day). While I already used screen to handle the lack of terminals (Alas, I am forced to use a Windows laptop to VPN in with), I thought there could be an easier way to do this.</p>
<p>The way I tend to work is that I ssh into a jump server, fire up screen, then ssh into the hosts I need to work on, and fire up screen on those hosts.</p>
<p>Now, this is nice, but it can get a bit tiring to do it all over
again. So, I found a tool called
<a href="http://www.harding.motd.ca/autossh/">autossh</a> which will automatically restart your ssh session if it drops for any reason but a graceful disconnect. (Well, there are others, but this is basically it). Combine this with your ssh-agent, and you can re-attach with easy. I also use <a href="http://www.funtoo.org/Keychain">keychain</a> to help manage my ssh-agent when I log in.</p>
<p>Now that the connection will come back, I need a way to re-attach to my screen session, or if there is not one, to start one for me. To do<br>
that, I have this is my .bashrc file:</p>
<pre><code>test -x $STY &amp;&amp; screen -xR
</code></pre>
<p>This will check to make sure that we are not already inside a screen session on the local host (<em>test -x $STY</em>), and if we are not, then either attach to an existing screen session or start a new one (<em>screen -xR</em>)</p>
<p>I have define this function in my .bashrc to spawn a new ssh connection in a separate screen window:</p>
<pre><code>function ss ()
{
screen -t $1 ssh $*
}
</code></pre>
<p>Easy stuff</p></body></html>

View file

@ -0,0 +1,6 @@
.. title: Making life easy over flaky links
.. slug: 200912making-life-easy-over-flaky-links
.. date: 2009/12/28 17:12:00
.. tags: cli,software,ssh,telecommute
.. link:
.. description: