Building Python Server for Secure communication with Raspberry Pi

0 votes
I'm kinda new to building a secure connection between a python server and the raspberry pi.

So, I already have a python server and a Raspberry Pi. The Pi uses socket to listen for a specific port when the python server attempts connecting to it. It's all happening on a low-level networking interface, which is a very simple one and isn't a secure method.

So, can anyone tell me a secure way to build communication between the python server and the Raspberry pi? I, actually, need the solution to at least meet the following requirements:

1. Password check
2. When python server wants some information from Pi, it connects to the pi. After python server gets what it wanted, it disconnects from the pi.

Thanks a lot!!
Jan 10 in IoT (Internet of Things) by Bharani
• 4,550 points
189 views

1 answer to this question.

0 votes

There could be several ways to add security to any such communication mechanism. Here are two solutions that I could think of right now:

As Python is running both on your server and the Raspberry, each method is very simple to implement.

This is an example for SSL/TLS socket. Also, I'll strongly advise on using an IoT-oriented communication protocol like MQTT, which also provides TLS/SSL security, for sensors' data acquisition. 

For the data encryption, you can refer to the following article.

answered Jan 10 by DataKing99
• 8,130 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

Optimal screen resolution for Raspberry Pi with 7" TFT LCD

Hello there! I'm using a 7" TFT ...READ MORE

answered Aug 14, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
89 views
0 votes
1 answer
0 votes
1 answer

Connect Android Things based Raspberry Pi 3 to wifi network for the first time!

Hey, I think its alright!  Your Raspberry Pi ...READ MORE

answered Jul 18, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
224 views
0 votes
1 answer
0 votes
1 answer

Display time in a Windows Core IoT app with a clock!

It is possible, but you should understand ...READ MORE

answered Jul 9, 2018 in IoT (Internet of Things) by nirvana
• 3,060 points
126 views
0 votes
1 answer

How to trigger Python script on Raspberry Pi from Node-Red

Node-RED supplies an exec node as part ...READ MORE

answered Sep 14, 2018 in IoT (Internet of Things) by Upasana
• 8,530 points
1,144 views
0 votes
1 answer

raspberry pi details

I think It's only possible if the ...READ MORE

answered Jan 22 in IoT (Internet of Things) by Shubham
• 13,300 points
30 views
0 votes
1 answer

Firewall issue with Webserver in UWP on Raspberry Pi 3

Here's what could be happenning: You port hasn't ...READ MORE

answered Oct 12, 2018 in IoT (Internet of Things) by DataKing99
• 8,130 points
96 views