|Problems? Is your data what you think it is?|
Net::SSH::Perl pty problem with SSH2? SOLVEDby cmv (Chaplain)
|on Dec 22, 2008 at 21:20 UTC||Need Help??|
cmv has asked for the wisdom of the Perl Monks concerning the following question:
Given machine A, B, and C...
I'm trying to login from A to B and remotely execute an interactive command on C.
A is running a perl script that uses Net::SSH:Perl to machine B. This works fine for both SSH1 and SSH2.
Then A tries to run ssh -t -l $usr2 $machineC icommand" from machine B
This will work for SSH1, but will fail for SSH2 failing with:
Machine A has been both a Sun and MacOS, and I see the same failure. My research indicates that Net::SSH::Perl is failing to setup the tty on machine B. Although I'm running an older version of Net::SSH::Perl, I don't see any code in the new version to fix this either.
Test code is attached - using "uname-a" instead of an interactive command, and ssh -t to force the error.
Any thoughts on how I can get this to work with SSH2?
UPDATE: I was able to modify SSH2.pm to fix this problem. A bug report has been submitted along with my code hacks to SSH2.pm that make it work.