Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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.