LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-09-2010, 04:13 AM   #1
nirajc
LQ Newbie
 
Registered: Mar 2010
Location: Urbana, IL
Distribution: Ubuntu Karmic
Posts: 5

Rep: Reputation: 0
ssh


If i ssh into a machine and run something is that process being run on my computer or the remote machine?
 
Old 03-09-2010, 04:21 AM   #2
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
When you ssh, you remotely log in the other machine, and then from your machine you run desired processes on the other machine !
 
Old 03-09-2010, 12:43 PM   #3
nirajc
LQ Newbie
 
Registered: Mar 2010
Location: Urbana, IL
Distribution: Ubuntu Karmic
Posts: 5

Original Poster
Rep: Reputation: 0
So if i have a script that runs half of all commands i type in the local computer and half on the remote computer will i be using both my computers at the same time. I am wondering whether this kind of running some applications on remote computers could be used as a grid computing platform
 
Old 03-09-2010, 01:29 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
first of all welcome to LQ

scond it is theoriteically possible if you
1. configure the remote machine not to require a password for a given user for ssh (i know its possible but not sure how and less secure, so make sure that you only allow it to happen from a trusted source and that the user is only given the bare minimum privelege to accomplish the tasks you want done) and then run ssh in your script in single command mode
2. somehow create a script that automatically enters the password when prompted and use the ssh command in single command mode (man ssh)

it would be probably easier if you explained the purpose because there may be more specialized software for accomplishing such a task then a shell script and ssh that would be far easier to impiment
 
Old 03-09-2010, 07:33 PM   #5
nirajc
LQ Newbie
 
Registered: Mar 2010
Location: Urbana, IL
Distribution: Ubuntu Karmic
Posts: 5

Original Poster
Rep: Reputation: 0
Well, I just got my new computer (Its a System76 Lemur. Yay!!) and my old one (running mint) is basically going to lie there without much to do. so i was thinking if i have both of them on the same domain and i run a script in the new one so that it runs a fixed amount (say 10-15%) of all processes i run on the old one so that i can kind of use my old computer to boost my new one. I was thinking of using boinc originally but that requires porting applications which is just overkill. but if what im thinking of works with ssh it might have potential to be used as a grid computing platform. If it works with two machines it wont be difficult to introduce more...
 
Old 03-09-2010, 07:38 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
hmm, well probably woudnt work with scripting but if you do a search for 'linux clustering' you could figure out how to configure this
possibly overkil but a fun project nonetheless
the problem with ssh is that the whole process is run on either the local machine or it the remote machine, it doesnt provide shared processing
 
Old 03-09-2010, 10:22 PM   #7
nirajc
LQ Newbie
 
Registered: Mar 2010
Location: Urbana, IL
Distribution: Ubuntu Karmic
Posts: 5

Original Poster
Rep: Reputation: 0
True it doesnt share the processes. I was thinking of a 10% probablity that a new process runs on the remote machine rather than the local one. so out of 10 processes 1 would run on the remote computer...
I found some how to s on clustering so im checking that out right now. Thanks
 
Old 03-09-2010, 11:06 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
For this very simple type of load-balancing you might do well to look at GNU queue. It's in Debian packaged as "queue". It should be in Ubuntu too.

Evo2.
 
Old 03-10-2010, 12:51 PM   #9
nirajc
LQ Newbie
 
Registered: Mar 2010
Location: Urbana, IL
Distribution: Ubuntu Karmic
Posts: 5

Original Poster
Rep: Reputation: 0
Couldn't fond queue in the ubunutu repositories, but im going to compile it 4m source. It seems easier to use that what i was thinking of. Thanks
 
Old 03-10-2010, 10:48 PM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
ssh is a program, running on your computer, which connects to the sshd daemon on the other computer, doing so in a secure fashion.

When you connect successfully, the remote daemon spawns a shell process on its (the remote...) computer, and causes that shell to run "as you." As you enter commands, these are relayed across the secure link and executed by the shell process on the remote computer. The output thereof is reflected back to you. All of the network traffic between the two computers is encrypted.

When you disconnect, the sshd daemon terminates the shell process that it had created on your behalf on the its (the remote...) computer.

Last edited by sundialsvcs; 03-10-2010 at 10:49 PM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
LXer: ssh-xfer: Quickly grabbing files over an existing SSH connection LXer Syndicated Linux News 0 08-08-2008 03:11 PM
setting up an ssh soxy or local ssh tunnel from within an ssh soxy Mangenius Linux - Networking 0 03-05-2007 03:15 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:33 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