Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 17 Jul 2018, 05:54
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Activating Bash scripts over the network
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Tue 14 Jun 2016, 11:33    Post subject:  Activating Bash scripts over the network  

Hi all

I have a need to start (and stop) existing Bash scripts on several Puppy machines from one "master".

It is a local network (static I.P.) with me as the only user so security is a low priority.

Any thoughts to what I should use to invoke the scripts?
Netcat? Netpipes?

Please note that I need to start the scripts as required and not at fixed times
so cron is of no use and VNC will be a total overkill.

T.I.A.
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 464
Location: Western United States

PostPosted: Tue 14 Jun 2016, 17:40    Post subject:  

Won't remote shell (rsh) do the job?
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5091
Location: Republic of Novo Zelande

PostPosted: Wed 15 Jun 2016, 05:26    Post subject:  

Hi Pete,

I have no experience of this kind of thing but I do recall reading some threads about similar remote control. Maybe have a look at these posts:

http://www.murga-linux.com/puppy/viewtopic.php?t=90129

http://murga-linux.com/puppy/viewtopic.php?t=90098

and a couple of older threads:
http://www.murga-linux.com/puppy/viewtopic.php?t=74213&sid=4039cdd614d83f94be56ce1ac5886608

http://www.murga-linux.com/puppy/viewtopic.php?t=31702
Back to top
View user's profile Send private message 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Wed 15 Jun 2016, 07:53    Post subject:  

@6502coder

Not a bad idea, will give it a try.

@greengeek

Thanks for the links, will check them out.
Back to top
View user's profile Send private message 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Wed 15 Jun 2016, 13:01    Post subject:  

Right, decided to stick with netcat (nc) as it's available on most (if not all) Puppies so no extra software required, works with the CLI or under the GUI and lastly, it's a breeze to use.

Thanks all for your ideas and suggestions.

Note to those thinking of also using netcat:

By itself it's very insecure, I use it simply because it's a "closed" network where I am the only user.
If you need extra security, then rather use rsh/ssh as 6502coder suggested or one of the VNC programs listed in greengeek's post.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 12203
Location: Stratford, Ontario

PostPosted: Wed 15 Jun 2016, 13:54    Post subject:  

Pete wrote:
Right, decided to stick with netcat

Netcat is a file transfer utility. I don't understand how you plan to remotely start/stop scripts with it.
Back to top
View user's profile Send private message 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Wed 15 Jun 2016, 13:59    Post subject:  

Netcat can transfer files but can also do much more.

To name a few....
Can generate network traffic for fault-finding.
Can be used to contact web servers to check for response headers.
Can be used for streaming of video and audio files.

...and last but not least, can be used to activate a remote shell on which we can execute commands and scripts.

Example to execute scripts and/or commands:

On remote machine, start a script like such that keeps netcat open and listening for connections:

Code:


#!/bin/sh

while [ 1 ]
do
nc -l -p 22000 -e /bin/sh
done



Then on the "master" computer enter the following:

Code:

nc The_IP_of_the_remote_pc 22000


So now one can execute commands as if on the other computer or even start scripts.

Note that by default, std out is fed back to the "master" computer, whilst std error is displayed on the local computer.

Also be aware that the nc on puppy (busybox) seems to be a slimmed down version of the real nc with less features but still very usable.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5091
Location: Republic of Novo Zelande

PostPosted: Wed 15 Jun 2016, 15:47    Post subject:  

Thanks for the nc info. Good to know. Just want to point out that RDP is not a type of VNC - it's apparently a "terminal services client" see wiki entry
Differences between RDP and VNC are discussed here and here, and there is a useful youtube comparison here.
Back to top
View user's profile Send private message 
Pete


Joined: 02 Mar 2014
Posts: 675

PostPosted: Wed 15 Jun 2016, 16:50    Post subject:  

@greengeek

Thanks for that.
I always thought of RDP and VNC as pretty much the same thing but now
know that RDP can actually be more efficient at times since it is "aware" of things like fonts and other gui components as opposed to just sending the whole screen as a graphic.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0475s ][ Queries: 11 (0.0164s) ][ GZIP on ]