adrian

adrian

Dropbear ssh server on nerves device

Hello!

I’m step by step getting deeper into nerves. I think it’s awesome. I’m reading and watching lots of resources related to buildroot, busybox, and nerves, but I still have many questions.

I’m using a custom raspberry pi 3 firmware. The only two changes I want to make is install dropbear and postgresql. My question now is about dropbear.

After reading this, I’ve added the package using make menuconfig, saved the configuration, and compiled. I’ve also added a file under rootfs_overlay/etc/default/dropbear with the following content:

DROPBEAR_ARGS="-p 222"

I’m using an USB serial converter for the rpi3 and I’m using also nerves_init_gadget so I have access to the IEx console via ssh in the default port 22, that’s why I want to run dropbear on port 222.

I can’t make it work. It looks like dropbear is not even starting. I can get into the system from the elixir shell, but is tedious:

System.cmd("dmesg", [], stderr_to_stdout: true, into: IO.stream(:stdio, :line))

I see nothing related to dropbear -nor postgresql-.

It looks like dropbear and postgresql use systemd for starting services, is it configured on the rpi3 nerves base system? I couldn’t find information about that.

Thanks a lot!

Adrián

Most Liked

adrian

adrian

@GregMefford thanks for your interest!

I think the first place I looked was the Systems page. I think is a better place to add the init information than the FAQ.

When I started to work with nerves, the documentation didn’t provide all the information I needed. I come from the web world, and even though I have knowledge on systems, I didn’t know a lot about buildroot, busybox, and so on. I had to find information about that.

For me it would had been very helpful a reference page informing how nerves has been built, and what is and what is not. Also some information about the tools nerves is based on, and the initial system you get with nerves. I found this reply from @ConnorRigby useful.

Usually, people come to nerves because they have a project in mind, and the project involves several stages, like setup, customization, setting up other packages, communicating using IO ports, sensors, UI interfaces… I’m not saying that we have to include all the stages in the documentation, but at least a section like “Where to go from here” or “What you can do now” that points to other documentation for those tasks. This will be useful for a newcomer that has a project in mind and doesn’t know exactly what it’s needed for getting it working.

I’ve been impressed with the community in this forum, providing quick and really helpful replies. If it wasn’t for this forum I probably had abandoned nerves. Also, the library Nerves init gadget was very helpful, and without it I probably had also abandoned. I know that it was designed for the Raspberry Pi Zero, and I’m using Raspberry Pi 3 but I need it, because it has some useful tools that I couldn’t have created myself, and I use a lot, specially mDNS, OTA firmware updates and RingLogger.

Said this, after every step I made through making my project work, I was impressed about nerves. I’m really thankful to the community and the developers that made this possible. Elixir (with OTP) and embedded devices is a perfect match made possible by this great project.

If I can contribute to this project I’d be happy to. I really like it. I don’t have experience yet and I almost have no free time on my life :slight_smile: but I would try to spend some time on it if there are some small and easy tasks I could do.

By the way, there are some open source projects based on Nerves that impressed me a lot, and got me excited about the possibilities of creating a better world. I’m talking about Farmbot, but I’m sure there are many other great projects over there too.

Thank you all the core developers, for creating this and being so helpful.

adrian

adrian

I’m glad it helps :slight_smile:

yes, what I found first was the Getting Started guide. IMHO it would be helpful another section at the end that points the user to deeper information, because I think more often than not, devs would need to use these concepts in their projects.

The examples are great, but including tutorials explaining those examples (in the docs, a wiki or any other place) would help too.

There are some things that would be used by most of the projects, like networking and debugging, that would be nice to have in the documentation too. Or at least a link to external documentation. Using a Raspberry pi example with a USB to serial converter and minicom or picocom is some of the most useful information I found for working on the project.

Let me know if I can help :wink:

ConnorRigby

ConnorRigby

Nerves Core Team

You will have to start dropbear yourself manually. A while back i built a dropbear wrapper. Check it out here

Where Next?

Popular in Questions Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
JulienCorb
I am trying to implement my new.html.eex file to create new posts on my website. new.html.eex: <h1>Create Post</h1> <...
New
jaysoifer
Is there a way to rollback a specific migration and only that one ("skipping" all the other ones)? Would mix ecto.rollback -v 2008090...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I fore...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35953 110
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31107 143
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47849 226
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New

We're in Beta

About us Mission Statement