HowTo: Node Red – View Linux login history

It is known that almost all Linux commands can be executed with the help of NodeRed. What makes the whole thing particularly practical, however, is that you can then also process the returned data with the help of NodeRed.

In the following article I use this to read the last Linux logins on my RaspberryPi and to display them in a table. In this way, the last logins can be clearly displayed and who logged in from where and when on the Linux computer in question. 🙂

Safety instructions

I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance.

Affiliate links / advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and shop via this link, receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support in being able to offer further useful projects in the future. 🙂


Helpful Articles:
So that you can install new nodes, NodeRed should of course already be installed.
How to prepare a RaspberryPi and then install NodeRed on it is described in the following articles.

The following three articles describe what to do to prepare the RaspberryPi:
RaspberryPi – Setting up for Nerdiys!
RaspberryPi – The first configuration
RaspberryPi – Controlling the RaspberryPi via SSH

NodeRed – Installing NodeRed on the RaspberryPi

Required tools:

Required material:

In the following list you will find all the parts you need to implement this article.

Log in to the NodeRed configuration interface

Before you can edit your NodeRed configuration you must - if activated - first log in to the NodeRed configuration interface.

View of the login screen. Here you have to enter the login details that you entered during the configuration of the login. Information about this can be found in the article NodeRed - User Login Setup.

Install required nodes

In order to be able to use the NodeCode below, in addition to the dashboard node (NodeRed – create a user interface with dashboard nodes), you must also install the node


How you can do this is described in the article NodeRed – Install new nodes.

Import node code

To test this code, you can simply import the code below into your NodeRed installation. You can find tips on this in the article NodeRed – Importing and exporting node code.

View of the NodeRed flow in the NodeRed configuration view.

Unfortunately, I could not insert the NodeCode directly here because the HTML code contained in it somewhat “confuses” the look of the website.

You can find the NodeCode here in the Nerdiy-Git:

View in the dashboard

Here you can see the table with the list of the last Linux logins.

I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂


P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂

Buy Me a Coffee at

Leave a Reply

Your email address will not be published. Required fields are marked *