530 lines
14 KiB
HTML
530 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en-us">
|
|
<head><meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<script type="application/ld+json">
|
|
{
|
|
"@context" : "http://schema.org",
|
|
"@type" : "BlogPosting",
|
|
"mainEntityOfPage": {
|
|
"@type": "WebPage",
|
|
"@id": "https:\/\/www.duckland.org\/"
|
|
},
|
|
"articleSection" : "post",
|
|
"name" : "Making life easy over flaky links",
|
|
"headline" : "Making life easy over flaky links",
|
|
"description" : "Making life easy over flaky links 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 ssh\u0026rsquo;ed 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.",
|
|
"inLanguage" : "en",
|
|
"author" : "",
|
|
"creator" : "",
|
|
"publisher": "",
|
|
"accountablePerson" : "",
|
|
"copyrightHolder" : "",
|
|
"copyrightYear" : "2009",
|
|
"datePublished": "2009-12-28 17:12:00 -0700 -0700",
|
|
"dateModified" : "2009-12-28 17:12:00 -0700 -0700",
|
|
"url" : "https:\/\/www.duckland.org\/post\/2009\/12\/making-life-easy-over-flaky-links\/",
|
|
"wordCount" : "328",
|
|
"image" : "https://www.duckland.org/%!s(\u003cnil\u003e)"",
|
|
"keywords" : [ ""cli"",""ssh"",""telecommute"","Blog" ]
|
|
}
|
|
</script>
|
|
|
|
|
|
<title>Making life easy over flaky links </title>
|
|
|
|
|
|
<meta name="description" content="Random Quacking" />
|
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="robots" content="all,follow">
|
|
<meta name="googlebot" content="index,follow,snippet,archive">
|
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
|
|
|
|
<link href="https://www.duckland.org/css/style.css?v=1654439072" rel="stylesheet" id="theme-stylesheet" type='text/css' media='all'>
|
|
|
|
<link href="https://www.duckland.org/css/custom.css?v=1654439072" rel="stylesheet" type='text/css' media='all'>
|
|
<link rel="shortcut icon" href="https://www.duckland.org/img/favicon.ico" type="image/x-icon">
|
|
<link rel="icon" href="https://www.duckland.org/img/favicon.ico" type="image/x-icon">
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body class="post-template-default single single-post single-format-standard ct-body singular singular-post not-front standard">
|
|
|
|
<div id="overflow-container" class="overflow-container">
|
|
<a class="skip-content" href="#main">Skip to content</a>
|
|
<header id="site-header" class="site-header" role="banner">
|
|
<div class='top-navigation'>
|
|
<div class='container'>
|
|
|
|
<div id="menu-secondary" class="menu-container menu-secondary" role="navigation">
|
|
<button id="toggle-secondary-navigation" class="toggle-secondary-navigation"><i class="fas fa-plus"></i></button>
|
|
|
|
<div class="menu">
|
|
|
|
<ul id="menu-secondary-items" class="menu-secondary-items">
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/personal">personal</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/photos">photos</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/sa">sa</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/sitenews">sitenews</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/software">software</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/space">space</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/travel">travel</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/unix">unix</a>
|
|
</li>
|
|
|
|
<li class="menu-item menu-item-type-taxonomy menu-item-object-category">
|
|
<a href="/categories/work">work</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<ul class="social-media-icons">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://twitter.com/duckunix" data-animate-hover="pulse" class="twitter" target="_blank">
|
|
<i class="fab fa-twitter-square" title="twitter"></i>
|
|
<span class="screen-reader-text">twitter</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://www.instagram.com/duckunix/" data-animate-hover="pulse" class="instagram" target="_blank">
|
|
<i class="fab fa-instagram" title="instagram"></i>
|
|
<span class="screen-reader-text">instagram</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<a href="mailto:duck@duckland.org" data-animate-hover="pulse" class="email">
|
|
<i class="fas fa-envelope" title="email"></i>
|
|
<span class="screen-reader-text">email</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://www.linkedin.com/in/donaldharper/" data-animate-hover="pulse" class="linkedin" target="_blank">
|
|
<i class="fab fa-linkedin-in" title="linkedin"></i>
|
|
<span class="screen-reader-text">linkedin</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://github.com/duckunix" data-animate-hover="pulse" class="github" target="_blank">
|
|
<i class="fab fa-github" title="github"></i>
|
|
<span class="screen-reader-text">github</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://www.duckland.org/index.xml" data-animate-hover="pulse" class="rss" target="_blank">
|
|
<i class="fas fa-rss" title="rss"></i>
|
|
<span class="screen-reader-text">rss</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
</ul></div>
|
|
|
|
</div>
|
|
|
|
<div class="container">
|
|
<div id="title-info" class="title-info">
|
|
<div id='site-title' class='site-title'>
|
|
|
|
<a href="/"> duckland.org </a>
|
|
</div>
|
|
</div>
|
|
<button id="toggle-navigation" class="toggle-navigation">
|
|
<i class="fas fa-bars"></i>
|
|
</button>
|
|
|
|
<div id="menu-primary-tracks" class="menu-primary-tracks"></div>
|
|
<div id="menu-primary" class="menu-container menu-primary" role="navigation">
|
|
|
|
<p class="site-description">Random Quacking</p>
|
|
|
|
|
|
<div class="menu">
|
|
<ul id="menu-primary-items" class="menu-primary-items">
|
|
|
|
|
|
<li class='menu-item menu-item-type-custom menu-item-object-custom '>
|
|
<a href="https://www.duckland.org/">Home</a>
|
|
|
|
</li>
|
|
|
|
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
|
|
<a href="https://www.duckland.org/stories/about/">About</a>
|
|
|
|
</li>
|
|
|
|
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
|
|
<a href="https://www.duckland.org/stories/privacy/">Privacy</a>
|
|
|
|
</li>
|
|
|
|
<li class='menu-item menu-item-type-post_type menu-item-object-page '>
|
|
<a href="https://www.duckland.org/photos/">Photo Galleries</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</header>
|
|
|
|
<div id="main" class="main" role="main">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div id="loop-container" class="loop-container">
|
|
|
|
|
|
<div class="post type-post status-publish format-standard hentry category-standard category-travel entry full-without-featured odd excerpt-1">
|
|
|
|
|
|
<div class="entry-meta">
|
|
<span class="date">28 December</span> <span> / </span>
|
|
|
|
<span class="author">
|
|
<a href="https://www.duckland.org/" title="Posts by Don Harper" rel="author">Don Harper</a>
|
|
</span>
|
|
|
|
|
|
|
|
<span class="category">
|
|
<span> / </span>
|
|
|
|
<a href="/categories/software">software</a>
|
|
</span>
|
|
|
|
|
|
|
|
</div>
|
|
<div class='entry-header'>
|
|
<h1 class='entry-title'> Making life easy over flaky links</h1>
|
|
</div>
|
|
<div class="entry-container">
|
|
<div class="entry-content">
|
|
<article>
|
|
<h1 id="making-life-easy-over-flaky-links">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 ssh’ed 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="https://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="https://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 && 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>
|
|
|
|
</article>
|
|
</div>
|
|
|
|
<div class='entry-meta-bottom'>
|
|
|
|
|
|
<div class="entry-categories"><p><span>Categories</span>
|
|
|
|
<a href="/categories/software" title="View all posts in software">software</a>
|
|
</p>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="entry-tags"><p><span>Tags</span>
|
|
|
|
<a href="/tags/cli" title="View all posts tagged cli">cli</a>
|
|
|
|
<a href="/tags/ssh" title="View all posts tagged ssh">ssh</a>
|
|
|
|
<a href="/tags/telecommute" title="View all posts tagged telecommute">telecommute</a>
|
|
|
|
|
|
</p></div> </div>
|
|
|
|
|
|
<div class="author-meta">
|
|
|
|
<div class="author">
|
|
|
|
<img alt='Don Harper' src="https://www.gravatar.com/avatar/343531b2be7fcd30e48f5c07dcd2176f?s=100&d=identicon" class='avatar avatar-72 photo' height='72' width='72'>
|
|
|
|
<span>
|
|
Written by:<a href="https://www.duckland.org/" title="Posts by Don Harper" rel="author">Don Harper</a> </span>
|
|
</div>
|
|
<div class="bio">
|
|
|
|
|
|
<p>Don is a computer guy stumbling through life trying to raise his kids and take some pictures</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a class="twitter" target="_blank"
|
|
href="https://twitter.com/duckunix">
|
|
<i class="fab fa-twitter-square"
|
|
title="twitter icon"></i>
|
|
</a>
|
|
|
|
|
|
<a class="linkedin" target="_blank"
|
|
href="https://www.linkedin.com/in/donaldharper/">
|
|
<i class="fab fa-linkedin"
|
|
title="linkedin icon"></i>
|
|
</a>
|
|
|
|
|
|
|
|
<a class="email" target="_blank"
|
|
href="mailto:duck@duckland.org">
|
|
<i class="fas fa-envelope"
|
|
title="email icon"></i>
|
|
</a>
|
|
|
|
|
|
|
|
<a class="instagram" target="_blank"
|
|
href="https://www.instagram.com/duckunix/">
|
|
<i class="fab fa-instagram"
|
|
title="instagram icon"></i>
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
<a class="github" target="_blank"
|
|
href="https://github.com/duckunix">
|
|
<i class="fab fa-github"
|
|
title="github icon"></i>
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<section id="comments" class="comments">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<footer id="site-footer" class="site-footer" role="contentinfo">
|
|
<h1>
|
|
|
|
<a href=""> duckland.org </a>
|
|
|
|
</h1>
|
|
|
|
|
|
<p class="site-description">Random Quacking</p>
|
|
|
|
|
|
<div id="menu-footer" class="menu-container menu-footer" role="navigation">
|
|
<div class="menu">
|
|
|
|
<ul id="menu-footer-items" class="menu-footer-items">
|
|
|
|
</ul>
|
|
|
|
</div> </div>
|
|
|
|
<ul class="social-media-icons">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://twitter.com/duckunix" class="twitter" target="_blank">
|
|
<i class="fab fa-twitter-square" title="twitter"></i>
|
|
<span class="screen-reader-text">twitter</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://www.instagram.com/duckunix/" class="instagram" target="_blank">
|
|
<i class="fab fa-instagram" title="instagram"></i>
|
|
<span class="screen-reader-text">instagram</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<a href="mailto:duck@duckland.org" class="email">
|
|
<i class="fas fa-envelope" title="email"></i>
|
|
<span class="screen-reader-text">email</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://www.linkedin.com/in/donaldharper/" class="linkedin" target="_blank">
|
|
<i class="fab fa-linkedin-in" title="linkedin"></i>
|
|
<span class="screen-reader-text">linkedin</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://github.com/duckunix" class="github" target="_blank">
|
|
<i class="fab fa-github" title="github"></i>
|
|
<span class="screen-reader-text">github</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li>
|
|
<a href="https://www.duckland.org/index.xml" data-animate-hover="pulse" class="rss" target="_blank">
|
|
<i class="fas fa-rss" title="rss"></i>
|
|
<span class="screen-reader-text">rss</span>
|
|
</a>
|
|
</li>
|
|
|
|
|
|
</ul> <div class="design-credit">
|
|
|
|
<p>© 2006-2021 Don Harper</p>
|
|
|
|
</div>
|
|
</footer>
|
|
|
|
</div>
|
|
<script src="https://www.duckland.org/js/jquery.min.js"></script>
|
|
<script src="https://www.duckland.org/js/jquerymigrate.js"></script>
|
|
<script src="https://www.duckland.org/js/production.min.js?v=1654439072"></script>
|
|
|
|
</body>
|
|
</html>
|