On 11/04/17, Avon said the following...
I have a linux box running ubuntu and it has a samba enabled folder containing a process.sh that I wish to be able to access and run from my raspberry pi over a LAN. Ideally I would like to be able to copy a file into the Ubuntu folder from the Pi first then run the process.sh script
on the Ubuntu box to process it.
Is that possible? I'm trying to figure out how best to access the folder from the Pi and also how to run scripts remotely using a script on the
Pi.
I'm sure it's possible, but not as easy as ssh. I use rsync to do that
between Linux versions (Pi is a Linux version). Even that can be done easier with filezilla which has sftp (Secure FTP). SSH encrypts everything so can be used over the net. If you want scripts, here's one I use on Ubuntu to get things from the BBS on the Pi:
#!/bin/bash
# get from dmz /mystic to here
rsync -aPrvz "-e ssh -p 2222" pi@dmz:/mystic/"$1" .
The "-e ssh -p 2222" is because I moved the ssh port from 22 to 2222 to keep
it out of mysitc's way. You need to edit (as root) /etc/ssh/sshd_config:
# What ports, IPs and protocols we listen for
Port 2222
After that you need to restart for it to take effect with:
sudo service ssh start
Another scenario is to try and call the script from my windows 7 box but although I can see the folder and the process.sh within it I'm stuck trying to get to a point whereby I can run that script on the Ubuntu box from the windows machine. I did find a pushd command that I could call from windows command prompt to allow access to the networked share
folder but that's as far as I got. running the .sh was not working :(
As noted putty is the best way to get to Linux from windows to run the script. There is also Filezilla for the PC/Linux/Mac...
SSH lets you get at all files, not just shares.
--- Mystic BBS v1.12 A36 (Linux/32)
* Origin: BCW Livingroom (21:1/145.5)