From: sujai <suj...@ta...> - 2007-05-09 08:17:11
|
Hello ken., I want to execute multiple commands on the ssh'ed machine.I want to execute iperf server. sujai Ken Irving wrote: > > On Tue, May 08, 2007 at 05:16:40PM +0530, Sujai Kumar wrote: >> Hello everybody., >> >> I am new to expect. I want to execute some commands after SSH'ing >> into a machine say 10.2.3.4. I have written script to automate ssh and >> that is happening fine. After SSH'ed into the machine it exits from >> the machine. How to execute a command in the SSH'ed machine. > > If all you want to do is issue commands, ssh is capable of doing that > directly, e.g., (from a shell prompt): > > $ ssh 10.2.3.4 tail /var/log/syslog > > This can be automated by setting up key-based authentication and > ssh-agent, e.g., using the keychain utility. > > IMHO Expect.pm and such are called for when you want to automate > interactivity with the remote system, i.e., generate output commands > based on the responses seen. > > Ken > > -- > Ken Irving, fn...@ua..., 907-474-6152 > Water and Environmental Research Center > Institute of Northern Engineering > University of Alaska, Fairbanks > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > > -- View this message in context: http://www.nabble.com/query-tf3709123.html#a10390185 Sent from the Perl - Expectperl-Discuss mailing list archive at Nabble.com. |