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 11, 2019 in IoT (Internet of Things) by Bharani
• 4,660 points
2,061 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 11, 2019 by DataKing99
• 8,250 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,130 points
1,061 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 19, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,135 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 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,541 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,620 points
3,258 views
0 votes
1 answer

raspberry pi details

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

answered Jan 23, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
705 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,250 points
1,095 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP