|Don't ask to ask, just ask|
Re^2: Net::SSH2 woesby ig (Vicar)
|on Jul 03, 2012 at 06:32 UTC||Need Help??|
The SSH session is created in Net::SSH2->new(), not $ssh2->connect(). Each SSH session can be used for only one connection, therefore, to connect to a new host, a new SSH session is required. So, you are correct: Net::SSH2->new() must be called for each host, inside the loop.