Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Connection to Remote Server
Name: penugonda Date: March 10, 2005 at 01:53:14 Pacific OS: Unix CPU/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.
Name: David Perry Date: March 10, 2005 at 04:49:52 Pacific
Reply:
Look into expect for executing commands after you establish a remote connection. Also, rsh might work for you.
0
Response Number 2
Name: sboffin Date: March 11, 2005 at 13:23:13 Pacific
Reply:
What do you want to do exactelly ? pls provide more details on what you want to do.
0
Response Number 3
Name: gurubit Date: March 17, 2005 at 02:34:19 Pacific
Reply:
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.
0
Response Number 4
Name: penugonda Date: March 20, 2005 at 17:50:35 Pacific
Reply:
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.
Summary: When I make for the first time Hyper Terminal connection to remote UNIX machine everything is okay. But if I press Ctrl+D ore disconnect and after that I tray make new connection the modems connect bu...
Summary: Thank you, here what I have compiled but I am confused how to combine ssh to remote server and then open the file from that remote server: #Special :replace tag to overload Perl builtins! use File::...