LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-05-2006, 06:58 PM   #1
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
exacuting remote comands over SSH with a shell script?


is it possable for me to write a shell script to open a SHH conection to a remote machine then exicute a comand on that remote machine, exit SSH then exicute a command on the local machine,

(this is presuming taht the ssh conection dousnet need a password)

if this is possable what syntax is needed to do this, if not what woudl be the best way of acchiving the same results?
 
Old 09-05-2006, 07:01 PM   #2
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,833

Rep: Reputation: 108Reputation: 108
Code:
ssh yourname@awaymachine.location dothiscommand
will do whatever at awaymachine, depending on setting.

Happy Penguins!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
running shell command on remote machine with ssh qrshat Solaris / OpenSolaris 3 08-17-2006 07:32 AM
something wrong with my shell on ssh to remote system stardotstar Linux - Software 1 08-03-2006 04:11 AM
mounting local hard drive in a remote shell (SSH) noir911 Linux - General 1 06-24-2005 05:55 AM
shutdown xserver via remote shell (ssh) ? timbaloo Linux - Newbie 1 07-07-2004 04:33 PM
telneting remote machine from a shell script sanjith11 Programming 11 05-26-2004 06:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration