is there a way to execute multiple ssh commands on a remote host and save each command output in a different scalar without using a module? i want execute all commands in the same ssh connection. i have tried to do something like that, but i don't know how to save the output in a scalar. is there a way to do that in this manner?
$check = <<'CMD'; for i in /home/* do echo $i done CMD open(SSH, "| ssh sshtest\@localhost -T"); print SSH $check; close(SSH) or die "$!";
In reply to execute multiple commands over ssh (without module) by dsx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |