{"id":318,"date":"2008-06-21T11:50:12","date_gmt":"2008-06-21T08:50:12","guid":{"rendered":"http:\/\/www.void.gr\/kargig\/blog\/?p=318"},"modified":"2008-06-21T11:51:01","modified_gmt":"2008-06-21T08:51:01","slug":"speed-up-multiple-ssh-connections-to-the-same-destination","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2008\/06\/21\/speed-up-multiple-ssh-connections-to-the-same-destination\/","title":{"rendered":"Speed up multiple ssh connections to the same destination"},"content":{"rendered":"<p>When you are doing multiple ssh connections to one host there&#8217;s a way to speed them up by multiplexing them. When you open the first network connection a special socket is created and then all other connections to the destination machine pass through the first network connection and don&#8217;t open any new ones. All that is done via ControlMaster and ControlPath settings for <a href=\"http:\/\/www.openbsd.org\/cgi-bin\/man.cgi?query=ssh_config&#038;sektion=0&#038;manpath=OpenBSD+Current&#038;arch=i386&#038;format=html\">ssh_config<\/a>.<\/p>\n<p><em>Example usage:<\/em><br \/>\nInside <strong>\/etc\/ssh\/ssh_config<\/strong><br \/>\n<code>ControlMaster auto<br \/>\nControlPath \/tmp\/%r@%h:%p<br \/>\n<\/code><\/p>\n<p><strong>Firsh ssh connection:<\/strong><br \/>\n<code>% ssh foobar@foo.bar.gr<br \/>\nPassword:<br \/>\nLinux foo.bar.gr 2.6.20.1-1-686 #1 SMP Sun Mar 4 12:44:55 UTC 2007 i686 GNU\/Linux<br \/>\nfoobar@foo:~$<br \/>\n<\/code><\/p>\n<p><strong>Second ssh connection:<\/strong><br \/>\n<code>% ssh -p 22 foobar@foo.bar.gr<br \/>\nLinux foo.bar.gr 2.6.20.1-1-686 #1 SMP Sun Mar 4 12:44:55 UTC 2007 i686 GNU\/Linux<br \/>\nfoobar@foo:~$<br \/>\n<\/code><br \/>\nNo password is asked and the connection opens up immediately.<\/p>\n<p>kudos to <a href=\"http:\/\/foss.ntua.gr\/forum\/index.php?action=profile;u=89\">apoikos<\/a> for telling me about this neat feature in <a href=\"http:\/\/www.fosscomm.gr\">fosscomm<\/a> \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you are doing multiple ssh connections to one host there&#8217;s a way to speed them up by multiplexing them. When you open the first network connection a special socket is created and then all other connections to the destination machine pass through the first network connection and don&#8217;t open any new ones. All that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[6,5,3,8,4],"tags":[],"class_list":["post-318","post","type-post","status-publish","format-standard","hentry","category-encryption","category-internet","category-linux","category-networking","category-privacy"],"aioseo_notices":[],"views":6858,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=318"}],"version-history":[{"count":0,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/318\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}