in reply to Re^3: a dumb socket question
in thread a dumb socket question

exactly. I would be running the server script which has the
ssh key shared to the other machine(no passwd is prompted)
I've implemented your suggestion in, but the client is not
getting anything back. It is waiting on the
@results = <SOCKET> indefinitely
here's the modified client:
if (socket(SOCKET, PF_UNIX, SOCK_STREAM, 0)) { connect(SOCKET, sockaddr_un($file)) || die "Could not connect: + $!"; print SOCKET $cmd; @results = <SOCKET>; print @results;
here's the modified server:
socket(SERVER, PF_UNIX, SOCK_STREAM, 0) || die "Could not create socke +t: $!"; unlink("$file"); bind(SERVER, $addr) || die "Could not bind: $!"; listen(SERVER,SOMAXCONN) || die "Could not listen: $!"; while (accept(CLIENT,SERVER) || die "could not accept: $!") { $cmd = <CLIENT>; if ($cmd) { $cmdd = "ssh2 rob\@machine_b $cmd"; + open(CMD, "$cmdd |"); @results = <CMD>; close(CMD); + print CLIENT @results; } }
somehow the print CLIENT @results is not
actually returning the results....guess i have to do more tests