Connection to Remote Server
|
Original Message
|
Name: penugonda
Date: March 10, 2005 at 01:53:14 Pacific
Subject: Connection to Remote ServerOS: UnixCPU/Ram: Solaris 9 |
Comment: Hi Looking for suggestions on writing a script that reads commands from a file, logs into remote server and runs the commands. I am pretty new to scripting. Any samples/suggestions are greatly appreciated. regards Ramesh
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: David Perry
Date: March 10, 2005 at 04:49:52 Pacific
Subject: Connection to Remote Server |
Reply: (edit)Look into expect for executing commands after you establish a remote connection. Also, rsh might work for you.
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: sboffin
Date: March 11, 2005 at 13:23:13 Pacific
Subject: Connection to Remote Server |
Reply: (edit)What do you want to do exactelly ? pls provide more details on what you want to do.
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: gurubit
Date: March 17, 2005 at 02:34:19 Pacific
Subject: Connection to Remote Server |
Reply: (edit)If you want to use some commands for which you know the pattern of the output or you need some answer after sending the commands then 'Send and Expect' is a good choice for you. Else if you are intersted in just connecting to the remote machine and executing some commands then you can use 'rsh' also.
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: penugonda
Date: March 20, 2005 at 17:50:35 Pacific
Subject: Connection to Remote Server |
Reply: (edit)Thanks all for your suggestions/inputs. Basically what I doing is writing a script to execute MML commands that are available in a file. What I need to do is - connect to the remote server - Read the command from file - Submit command - Get response/error and write into logfile - Disconnect It would be desirable to connect to the remote server and execute all the commands and then disconnect rather than open and close the connection for each command from the file. thanks for your great help. regards Ramesh
Report Offensive Follow Up For Removal
|
Use following form to reply to current message: