I am able to log in and run some commands on a remote
host as follows. I am not sure how to do interactive
commands like "su -" which will prompt for user id
and password.
Thank you in advance
,
Robert
print "Enter USER NAME on $dst : ";
chop ($user = <STDIN>); # get user name and remove carriage return
system 'stty', '-echo'; # Turn echo off for the password
print "Enter the PASSWORD ( It will not be echoed on the screen ) : ";
chop ($su_pass = <STDIN>); #get user password and remove carriage return
system 'stty', 'echo'; # turn echo back on
print "\n";
$t = Net::Telnet -> new (); # create handle for telnet
$t->open("$dst"
; # open telnet session
$t->login($user, $pass); # login with user name and password
@ls = $t->cmd("/usr/bin/ls"
; # run ls command on remote machine
print "ls : @ls "; # print results of ls command
host as follows. I am not sure how to do interactive
commands like "su -" which will prompt for user id
and password.
Thank you in advance

Robert
print "Enter USER NAME on $dst : ";
chop ($user = <STDIN>); # get user name and remove carriage return
system 'stty', '-echo'; # Turn echo off for the password
print "Enter the PASSWORD ( It will not be echoed on the screen ) : ";
chop ($su_pass = <STDIN>); #get user password and remove carriage return
system 'stty', 'echo'; # turn echo back on
print "\n";
$t = Net::Telnet -> new (); # create handle for telnet
$t->open("$dst"
$t->login($user, $pass); # login with user name and password
@ls = $t->cmd("/usr/bin/ls"
print "ls : @ls "; # print results of ls command