1Net::OpenSSH::ConnectioUnsCearchCeo(n3t)ributed Perl DocNuemte:n:tOapteinoSnSH::ConnectionCache(3)
2
3
4
6 Net::OpenSSH::ConnectionCache - cache and reuse SSH connections
7 transparently
8
10 use Net::OpenSSH;
11 use Net::OpenSSH::ConnectionCache;
12
13 for (1..10) {
14 my $ssh = Net::OpenSSH->new($host);
15 $ssh->system("$cmd $_");
16 }
17
19 This module installs a $Net::OpenSSH::FACTORY hook implementing a SSH
20 connection caching scheme.
21
22 $Net::OpenSSH::ConnectionCache::MAX_SIZE controls the cache size. Once
23 as many connections are allocated, the module will try to free any of
24 them before allocating a new one.
25
26 The function "clean_cache" makes the module forget (and close) all the
27 cached connections:
28
29 Net::OpenSSH::ConnectionCache::clean_cache();
30
32 Copyright (C) 2011, 2014 by Salvador FandiƱo (sfandino@yahoo.com)
33
34 This library is free software; you can redistribute it and/or modify it
35 under the same terms as Perl itself, either Perl version 5.10.0 or, at
36 your option, any later version of Perl 5 you may have available.
37
38
39
40perl v5.28.1 2018-02-08 Net::OpenSSH::ConnectionCache(3)