I am using ssh to start to open a connection to a "service" account on a remote server. The remote account is configured to automatically start a process which reads a few lines (three, right now), processes the information and returns a status. That part works.
On the client side I am testing with:
use IPC:;Open2; my ($childin,$childout,$childerr); my $cmd = qq(/usr/bin/ssh -i $KEYFILE $USER\@$SERVER 2>/dev/null); my $pid = open2 ($childout,$childin,$cmd); my $status = $!; # check for success here # send commands print $childin $line1 print $childin $line2 print $childin $line3 etc...
That works but if there is a "better" way I'd like to know. I tried with Net::SSH::Perl but couldn't get it to work with the remote server starting the command. Maybe I am overlooking something.
The application is intended to allow a user to reset and change his or her Kerberos password from a web interface. The web server does not run on the Authentication Server or KDC.
In reply to Connecting to STDIN and STDOUT over SSH by enemyofthestate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |