Page 1 of 1

Wondering how to tackle this

Posted: Wed Sep 30, 2015 8:19 pm
by blueblast88
My friend and I have been given the task to make a server that needs to be available on the internet to receive either: A string of text, Or a .txt File. However, I need this thing to be secure, fast acting, and very reliable. I was wondering if I should use the Pi as an FTP server or use some sort of HTTP server. Also be aware that it will need to be able to receive data from different users at once. One I get the text to the pi, I know what I need to do. But getting it there securely and reliably becomes the issue. Any help would be appreciated.

Cheers,
Blueblast88

Re: Wondering how to tackle this

Posted: Wed Sep 30, 2015 9:20 pm
by DougieLawson
You can run that in ten lines of python.
https://docs.python.org/3/library/http.server.html

It'll even run out of the box from the command line: python -m http.server --cgi 8000
which is ZERO lines of code.

Re: Wondering how to tackle this

Posted: Wed Sep 30, 2015 9:23 pm
by HiroProtagonist
Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"

Re: Wondering how to tackle this

Posted: Thu Oct 01, 2015 9:58 pm
by blueblast88
DougieLawson wrote:You can run that in ten lines of python.
https://docs.python.org/3/library/http.server.html

It'll even run out of the box from the command line: python -m http.server --cgi 8000
which is ZERO lines of code.
Thanks! I am not home to try this right now however I will let you know how it goes! Also: How secure is this? and how can I make it as secure as possible?

Re: Wondering how to tackle this

Posted: Thu Oct 01, 2015 9:59 pm
by blueblast88
HiroProtagonist wrote:Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"
Hey! Thanks for the reply. A friend of mine told me ssh wouldn't be secure enough either. The sending devices can vary from a computer to IPhone to Android device. Most likely through a browser.

Re: Wondering how to tackle this

Posted: Thu Oct 01, 2015 10:05 pm
by kusti8
blueblast88 wrote:
HiroProtagonist wrote:Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"
Hey! Thanks for the reply. A friend of mine told me ssh wouldn't be secure enough either. The sending devices can vary from a computer to IPhone to Android device. Most likely through a browser.
How is ssh not secure enough? You can fiddle around with the encryption if you want.

What's the need for such security?

Re: Wondering how to tackle this

Posted: Fri Oct 02, 2015 12:14 am
by ame
blueblast88 wrote:
HiroProtagonist wrote:Hard to know what is best without more info, [what are the capabilities of the devices sending data?].

Neither FTP nor HTTP are secure. You could use HTTPS, but that involves faffing around with certificates etc.

Why not use ssh? Set up ssh on a non-standard port [exposing the standard port on the internet will get you lots of script-kiddie hits]. You can do this by port forwarding the port of your choice on your router to port 22 on the pi.

Then your clients can:

ssh -p <port> <user>@<address> somescript.sh "string of text"
Hey! Thanks for the reply. A friend of mine told me ssh wouldn't be secure enough either. The sending devices can vary from a computer to IPhone to Android device. Most likely through a browser.
You need smarter friends.

If you are doing it through a browser you need https.