Hi is it possible to execute multiple commands over one, persistent SSH Terminal Session using Perl and the ssh binary?
NB: I cannot use Perl SSH libraries, any of them.
I am scripting a remote server and I need to execute a few commands, I just want to open an SSH Session, execute multiple remote commands and grab the output like this from within Perl:
ssh user@host command1 -->output command2 -->output .. and so on exit
instead of
ssh user@host command1-->output ssh user@host command2-->output .. and so on
Each of the latter has connect/auth overhead I want to avoid.
I have searched alot but really don't know how to define what I am looking for, I am sure perl's excellent I/O can do it, just not sure how, as I usually just ue backticks becuase the scripts tend to be local, but this one requires a remote ssh terminal session.
Thanks, nano.In reply to Persistent SSH Terminal from Perl? by nanomonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |