Re: [SLUG] Remote Execution

From: Levi Bard (levi@bard.sytes.net)
Date: Fri Nov 14 2003 - 10:52:49 EST


> You can use ssh with an authorized key to do this. In short:
> On machine A as a regular user, say user alice:
> ssh-keygen -b 768 -t rsa -f identity
>
> This will create an identity and identity.pub file.
>
> cp identity ~/.ssh
>
> Copy the identity.pub file to the .ssh/authorized_keys file on the remote
> machine in the home directory of the user you'll be running the job as.
> For example, if you'll be running as user 'bob' on the remote Machine B:
>
> scp identity.pub bob@machineb:
> (enter password)
>
> Then on machine B as bob:
>
> cat identity.pub >> ~/.ssh/authorized_keys
> chmod 600 ~/.ssh/authorized_keys
>
> At this point Alice on MachineA should be able to ssh into MachineB as bob
> without getting prompted for a password. She can then run programs on
> MachineB with:
>
> ssh bob@machineb programname
>
> You can put this in the user crontab to automate.

I'd be very careful about permissions if doing this.

Incidentally, I'm sick of hearing about Alice and Bob and their secret
messages! Why don't they just publicly announce their office romance?
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:47:00 EDT