I think you need to create a new ssh2 object for each connection. It would not be very secure if you didn't in my opinion. However, SSH2 may allow it, if you use keys auth. See Net::SSH2 Question - again- Your error "unable to exchange encryption keys" seems to indicate this.