sh files question

Smoot Carl-Mitchell smoot at tic.com
Tue Oct 28 22:55:08 UTC 2008


On Tue, 2008-10-28 at 15:47 -0700, John Hubbard wrote:
> Smoot Carl-Mitchell wrote:
> > On Tue, 2008-10-28 at 15:18 -0700, John Hubbard wrote:
> >   
> >> Anna EdwARds wrote:
> >>     
> >>> I have a question. Is sh capable of being run on one computer (say 
> >>> anna-desktop), not through ssl, but open an ssl to anna-router while 
> >>> running? Say its the following
> >>> ssl anna-router
> >>> username ash1574
> >>> password ******** [the password is in there]
> >>> apt-get moo
> >>>  
> >>> Is this possible in an sh file or do i have to use the broom myself?
> >>>
> >>>       
> >> Not sure about 'ssl' but with ssh/scp you can do this easily.  First 
> >> copy the file you want to run to the remote machine. 
> >> scp localFile remoteMachine:pathToNewFile/
> >> then you do an
> >> ssh remoteMachine pathToNewFile/fileNAME
> >> see man ssh and man scp for more information.
> >> google around and you can even have it set up to not prompt you for a 
> >> password. 
> >>     
> >
> > You do not even need to copy the file to the remote machine. Do:
> >
> > ssh remote_host sh <file
> >
> > Where file is a file of shell commands.
> >   
> If I wanted to use a different shell (say zsh) would I do a:
> ssh remoteHost zsh <file

Yes.
-- 
Smoot Carl-Mitchell
System/Network Architect
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list