Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i want to run a sript that is present in local machine,but it should perform operations on remote machine.

i have already generated public-private keys,so no password authentiaction is required.

share|improve this question

Run the shell on the other side, and send the script through.

ssh user@host bash < script.sh
share|improve this answer
1  
is it bash or 'bash -s'? – sam Feb 14 '11 at 11:46
    
-s is not required except under specific conditions. – Ignacio Vazquez-Abrams Feb 14 '11 at 11:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.