|
Posted by Tweetie Pooh on September 28, 2004, 11:24 pm
Please log in for more thread options
This topic has come up in other places but solutions offered are either too
complex or just don't work.
I am trying to write an app for an internal LAN (so total security is not
really an issue). One of the functions required is to run passwd as root
on a remote box.
I now have the app connecting fine using keys in ssh-agent so no passphrase
is required at run time. The login occurs OK, from syslog messages.
I have implemented the register_handler for packets as per
remoteinteract.pl as we have to use SSH-1.
First try just showed "Sorry". This is due to the security mechanism I
know about re tty on the session (ssh -t from shell). So I add the pty flag
to the ssh session.
The program now run to the cmd("passwd username") and then waits. I can
see the passwd running on the target host. I now need to kill passwd or my
local program to get console back.
The source box has a latter version of OpenSSH but Net::SSH::Perl only has
protocol 1 built. The remote has only SSH-1.
Any ideas?
TIA
|