{"id":10,"date":"2011-08-11T11:10:04","date_gmt":"2011-08-11T11:10:04","guid":{"rendered":"http:\/\/tech.moosaico.com\/blog\/?p=10"},"modified":"2016-02-05T12:00:16","modified_gmt":"2016-02-05T12:00:16","slug":"using-more-than-one-server-in-authentacacsplus","status":"publish","type":"post","link":"https:\/\/thejoyofstick.com\/blog\/2011\/08\/11\/using-more-than-one-server-in-authentacacsplus\/","title":{"rendered":"Using more than one server in Authen::TacacsPlus"},"content":{"rendered":"<p>Added the possibility of using a list of TACACS+ servers to the perl module Authen::TacacsPlus.<\/p>\n<p>Just pass an array reference with each server parameters to the constructor.<\/p>\n<pre class=\"brush: perl; title: ; wrap-lines: true; notranslate\" title=\"\">\r\nmy $tac = new Authen::TacacsPlus(\r\n        &#x5B;Host=&gt;tp1.example.com, Key=&gt;'Th3k3y', Timeout=&gt;5],\r\n        &#x5B;Host=&gt;tp2.example.com, Key=&gt;'kikiriki'],\r\n        &#x5B;Host=&gt;tp3.example.com, Key=&gt;'l0keet', Port=&gt;4949]\r\n);\r\n<\/pre>\n<p>The order is relevant, so it will only try <code>tp2<\/code> if <code>tp1<\/code> failed.<\/p>\n<p>Please note that it&#8217;s a server fail (unreachable, wrong key) and not an authentication one. If <code>tp1<\/code>responds with a failed authentication it won&#8217;t test the other servers. You can get the patched version from the &#8220;moreservers&#8221; branch at <a href=\"https:\/\/github.com\/biafra\/Authen--TacacsPlus\/tree\/moreservers\">https:\/\/github.com\/biafra\/Authen&#8211;TacacsPlus\/tree\/moreservers<\/a> It will not break the use of the other syntax.<\/p>\n<pre class=\"brush: perl; title: ; wrap-lines: true; notranslate\" title=\"\">\r\n$tac = new Authen::TacacsPlus(Host=&gt;$server,\r\n                              Key=&gt;$key,\r\n                               &#x5B;Port=&gt;'tacacs'],\r\n                               &#x5B;Timeout=&gt;15]);\r\n<\/pre>\n<p><b>Update:<\/b> It has been included in the module <a href=\"http:\/\/search.cpan.org\/dist\/Authen-TacacsPlus\/\">distribution<\/a> (v0.21) by the maintainer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Added the possibility of using a list of TACACS+ servers to the perl module Authen::TacacsPlus. Just pass an array reference with each server parameters to the constructor. my $tac = new Authen::TacacsPlus( &#x5B;Host=&gt;tp1.example.com, Key=&gt;&#8217;Th3k3y&#8217;, Timeout=&gt;5], &#x5B;Host=&gt;tp2.example.com, Key=&gt;&#8217;kikiriki&#8217;], &#x5B;Host=&gt;tp3.example.com, Key=&gt;&#8217;l0keet&#8217;, Port=&gt;4949]&hellip; <a href=\"https:\/\/thejoyofstick.com\/blog\/2011\/08\/11\/using-more-than-one-server-in-authentacacsplus\/\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13,11],"tags":[15,84,14],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-network","category-perl","tag-authentication","tag-perl","tag-tacacs"],"jetpack_shortlink":"https:\/\/wp.me\/pcmwlL-a","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":39,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":708,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions\/708"}],"wp:attachment":[{"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thejoyofstick.com\/blog\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}