Remote access for the beagle bone black (BBB) to modify /upgrade file from cloud server

Hi,
I am using Beagle Bone Black with Debian image and kernel version 4.4.30-ti-r64. Please anyone suggest how to access the beagle bone black remotely. Let me explain the requirement, I have an application running on BBB and connected to AWS cloud server through web socket. Now, just in case want to upgrade the application remotely from cloud server, how do I do that?

Thanks and regards,
NK

You need some sort of client application running on the beaglebone which can receive new apps from server.

To access to beagle-bone remotely you should have its static IP address.

Hi,
Could you please help me the best utility to implement this and procedure to do so, and also how to use a static IP address in beagle-bone-black?

Thanks and regards,
NK

Hi,
You can use services like Pitunnel for accesing and modifying beaglebone through remote acess

Hi,
I googled and understand pitunnel is for raspberry pi, what is the similar thing for beagle bone. Please share a good link to understand the process in a better way.
Do I need to register on a server for remote access?

How do I differentiate multiple beagle-bones for remote access?
What is the limitation on the number of beagle-bones?

Regards,
NK

If you can put some effort here is an most common solution for remote access OpenVPN

https://wiki.debian.org/OpenVPN#Debian_Server_with_Android_.2F_iOS_devices

Hi,
You can use pi tunnel for beaglebone also if you have a debian os running in the bbb. Just follow the steps in the pitunnel page, create an account and add device, while adding device they will ask you to download and install pitunnel files, ie that will be running in background in the bbb.

Is there a way to access the beagle-bone using SSH or something like that without registering the device to another server?
This is for commercial purposes and data protection is very important. Right now, it is connected to the AWS cloud server where our web application is running.

Thanks and regards,
NK

You can use ssh but you need to get some help from whoever administers
the "AWS cloud server".

Things needed:-

    The ssh daemon in the BBB needs to be running (I can't remember if
    this is default or not)

    You need to know the BBB's IP address, presumably it will be on a
    LAN connected to the "AWS cloud server".

    You need the "AWS cloud server" or the router 'behind' it to
    forward connections from the internet (i.e. you) on port 22 to the
    BBB

Looking at what "AWS cloud server" I suspect that the IOT services
there might be what you need to talk to your BBB.

This is a network setup issue. Any remote access solution requires that a network route exist from your computer to the BBB. If you and the BBB are in the same local network, it’s routable and you can connect to it. If the BBB has a public IP address (or port forwarding is set up to it), it’s routable and you can connect to it. If the BBB is behind a NAT and no port forwarding is set up, it’s not routable and you cannot connect to it.

Here’s where the various tunnelling and VPN solutions come in. You can choose one which is best for your requirements, but you cannot get remote access to a non-routable device without them.

I’ve used a simple jumpbox in the form of an SSH server where all the different BBB-s connect to. Each opens a remote tunnel on a specific port which leads back to it. Eg. port 20013 would have a tunnel to device nr 13, port 20014 to nr 14 etc. There’s a Debian package called autossh with a script which maintains a persistent SSH connection to the jumpbox. This is a fairly simple solution to set up and use initially, but not a very good one - mainly because it doesn’t scale beyond a few dozen devices. I’d go for a VPN next time.

Thank you for the information. I remember my ex-colleague used to download a file from a server using curl utility and run those files. So, I would like to know any similar simple procedure to download and upgrade BBB binary files which are stored in the server.

Regards,
NK

Hi Niresh,

I have a binary file that is basically compiled C application code. If I send an upgrade command to the controller from the server, the controller should take that binary file from the server, replace the old one and run with the updated binary file.

Regards,
NK

I've distributed custom software as deb packages hosted by a private apt repository (Sonatype Nexus OSS). Mass-updates got manually triggered via ansible (which required the aforementioned SSH jumphost).

You can do something similar - package your binaries as a deb package, host an apt repository and figure out how to trigger updates. Or you can roll your own update scripts and repo. Or you can search for third-party solutions. I assume most of the underlying problems are the same - a trigger mechanism, a hosted package repository, authenticated data pipe, service restarting, recovery from botched upgrades etc.

Thank you Tamro. I hope a trigger mechanism is not a problem because continuous data exchange is happening between the AWS server and controller through websocket. I can create a separate data packet to initiate this trigger command to a controller to which I wish to upgrade. In my case, only two executable binary files are required for firmware update and which I must keep in the AWS server because data privacy is very important.

I’m a newbie to the Linux environment. So, It would be very grateful if you can explain to me with an example for better understanding or a link.

Regards,
NK

Reading your questions that ignore previous suggestions I’d suggest this link

Linux for Dummies, 10th Edition
[

Linux for Dummies, 10th Edition

With an influx of first-time Linux users comes the need for guidance laid out in simple everyday terms. The Linux For Dummies series has …

](https://www.goodreads.com/book/show/50610418-linux-for-dummies-10th-edition)

Thank you Tamro. I hope a trigger mechanism is not a problem because continuous data exchange is happening between the AWS server and controller through websocket. I can create a separate data packet to initiate this trigger command to a controller to which I wish to upgrade. In my case, only two executable binary files are required for firmware update and which I must keep in the AWS server because data privacy is very important.

It's not terribly relevant where the files are stored - it's hosting them that requires some thinking. E.g. googling for "amazon aws host apt repository" seems to come up with a few solutions - e.g. https://www.aptly.info. I can't vouch for any of them.

I'm a newbie to the Linux environment. So, It would be very grateful if you can explain to me with an example for better understanding or a link.

I'm sorry to say that automatic upgrades of running services on a Debian box is quite the deep end to get thrown into as a newbie :slight_smile: Mark's suggestion is not an improper one in this case.

If you go the route of deb package and apt repository, I'd suggest reading chapters 5, 6 and Debian Administrator's handbook
https://debian-handbook.info/browse/stable/ - this briefly explains how they are used.

https://wiki.debian.org/DebianRepository/Setup has some info on how repositories are set up. AWS-friendly Aptly is in there somewhwere.

Depending on your circumstances, you might want to look into creating a systemd service out of your application:
https://linuxconfig.org/how-to-create-systemd-service-unit-in-linux

Thank you for your support. I will go through the link and get back to you.

Regards,
NK