Howto Use SSH To Run Command On A Remote Machine

by Vivek Gite · 6 comments

This article examined a simple, but powerful, method to run commands on a remote machine using combination of ssh and a shell script:

Use Secure Shell (SSH) to run commands on remote UNIX systems and, with some simple scripts, put together a system that enables you to manage many systems simultaneously from one machine without having to log in directly to the machines themselves. Also examine the basics of a distributed management system and some scripts and solutions using the technique.

I have already covered how to execute commands on multiple Linux or UNIX servers via a shell script. The disadvantage of shell script is commands do not run in parallel on all servers. However, several tools exist to automate this procedure in parallel. With the help of tool called tentakel (highly recommended) , you run distributed command execution. Also, you can execute commands on multiple Linux or UNIX servers using special tools such as multixterm from expect project.

=> Distributed administration using SSH

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 6 comments… read them below or add one }

1 humayun 08.28.07 at 7:04 am

Thank you

2 charles 09.07.07 at 9:20 am

Good job

3 Cayu 09.10.07 at 2:55 pm

good article

4 mariuz 01.17.08 at 3:31 pm

if you have python2.5 like on my ubuntu system
you must install from svn

http://sourceforge.net/tracker/index.php?func=detail&aid=1581326&group_id=76769&atid=548189
“I checked in a fix. You can try it out by checking out the development
version of tentakel using the following command:”

svn co http://svn.tuebingen.mpg.de/tentakel/trunk/
cd trunk/tentakel
make ; make install

5 Gizmoya 04.28.08 at 12:35 pm

Thx a lot its very nice and usefull info

6 Boby Thomas 03.24.09 at 10:51 am

Good information. Thanks

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: