Productive Linux


 Subscribe via Feedburner in a reader

Enter your email address:

Delivered by FeedBurner


Don't have an account?
Sign up to
Forgot your password?

A little bit about rsh
5 March 2004 @ 16:13 GMT
by Nomad

Being able to run progams on remote computers is something that is being hyped at the moment as consultants push web services. However, unix systems and Linux have had this capability for a long time.

Of course, opening up another machine to accept remote commands represents a security risk. These days, it is possible and far safer to run any programs through the secure shell server (sshd) on the host on which you want to run the programs. To do you'll need the ssh client program on the client machine. "rsh", the command that allows running remote programs, comes as part of any secure shell distribution.

rsh allows simple shell commands to be executed. For example:

rsh user1@somehost.tld ls

At this stage, you will, probably be asked for a password. Then you'll get a listing of the home directory of user1 on somehost.tld.

One of the most useful uses of rsh is when it is invoked by tar, the archiving program. So,

tar cjf user1@otherhost.tld:backup.tar.bz2 ~

will create a a file called 'backup.tar.bz2' in the home directory of user1 on otherhost.tld, containing my home directory tree.

Comments disabled