I copied your code exactly, only changed the host, user and password, and I'm, again, greeted with
d:\Desktop>sshtest
Logged in
Can't locate object method "die_with_error" via package "ssh2" (perhap
+s you forg
ot to load "ssh2"?) at D:\Desktop\sshtest.pl line 17.
it even duplicated my typo in the original {forgot a $ in the ssh->die... line} Something strange is going on and I'm not sure how to chase it down. I guess I have to grit my teeth and try reading some of the code in Net::SSH2::Channel and perhaps sticking in some debugging info... Ugh!