{"id":713,"date":"2009-01-02T18:36:26","date_gmt":"2009-01-02T16:36:26","guid":{"rendered":"http:\/\/www.marblestation.com\/blog\/?p=713"},"modified":"2012-04-26T16:18:58","modified_gmt":"2012-04-26T14:18:58","slug":"mantener-sesionesconexiones-ssh-abiertas-con-autossh","status":"publish","type":"post","link":"https:\/\/www.marblestation.com\/?p=713","title":{"rendered":"Mantener sesiones\/conexiones SSH abiertas con autossh"},"content":{"rendered":"<p>Nos podr\u00eda interesar mantener una conexi\u00f3n SSH permanente en dos equipos, por ejemplo para aprovechar las capacidades de <a href=\"http:\/\/www.marblestation.com\/blog\/?p=708\">creaci\u00f3n de t\u00faneles cifrados<\/a> entre diferentes equipos. Si utilizamos el comando &#8216;ssh&#8217; habitual, en caso de que se caiga la conexi\u00f3n por cualquier motivo (p.ej. desconexi\u00f3n temporal de la l\u00ednea) tendremos que volver a ejecutar el comando manualmente.<\/p>\n<p>Para evitar esta problem\u00e1tica tenemos <a href=\"http:\/\/www.harding.motd.ca\/autossh\/\">autossh<\/a>, el cual se encargar\u00e1 de relanzar la conexi\u00f3n &#8216;ssh&#8217; en caso de que deje de estar operativa:<\/p>\n<pre>\r\nAUTOSSH_DEBUG=1\r\nAUTOSSH_GATETIME=0\r\nAUTOSSH_PORT=1610\r\nautossh usuario@servidor.com -L 1610:127.0.0.1:1610\r\n<\/pre>\n<p>Para el correcto funcionamiento, es recomendable el uso de conexiones SSH con claves RSA, de lo contrario al relanzar la conexi\u00f3n SSH se requerir\u00e1 la intervenci\u00f3n del usuario para introducir la contrase\u00f1a (ver secci\u00f3n &#8216;Acceso remoto: SSH&#8217; de <a href=\"http:\/\/www.marblestation.com\/blog\/?p=674#6\">Securizaci\u00f3n de un sistema Ubuntu (GNU\/Linux)<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nos podr\u00eda interesar mantener una conexi\u00f3n SSH permanente en dos equipos, por ejemplo para aprovechar las capacidades de creaci\u00f3n de t\u00faneles cifrados entre diferentes equipos. Si utilizamos el comando &#8216;ssh&#8217; habitual, en caso de que se caiga la conexi\u00f3n por cualquier motivo (p.ej. desconexi\u00f3n temporal de la l\u00ednea) tendremos que volver a ejecutar el comando &hellip; <a href=\"https:\/\/www.marblestation.com\/?p=713\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Mantener sesiones\/conexiones SSH abiertas con autossh<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,6],"tags":[],"class_list":["post-713","post","type-post","status-publish","format-standard","hentry","category-espanyol","category-tecnologia"],"_links":{"self":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/713","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=713"}],"version-history":[{"count":4,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/713\/revisions"}],"predecessor-version":[{"id":1228,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/713\/revisions\/1228"}],"wp:attachment":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}