Computing.Net > Forums > Unix > Connection to Remote Server

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

Reply to Message Icon

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.

regards
Ramesh



Sponsored Link
Ads by Google

Response Number 1
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.

thanks for your great help.

regards
Ramesh


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Sed Help [/] how to launch an independ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Connection to Remote Server

Problem with connection to remote system www.computing.net/answers/unix/problem-with-connection-to-remote-system/1696.html

Dial Up Connection to Unix Servers www.computing.net/answers/unix/dial-up-connection-to-unix-servers/5937.html

Find match in two diff files at tim www.computing.net/answers/unix/find-match-in-two-diff-files-at-tim/8061.html