Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Customizing image with ssh key and static ip to be installed on multiple boards

Featured Replies

Hello, 

 

I am planning to create a Kubernetes cluster from 5 Raspberry PI and one of the alternatives mentioned in tags, 9 hosts in total. 

I want to mount and customize the installation images with ssh keys, static IP address, etc, and to skip the initial script offered at login by the CLI images.

Can you point me to the right piece of documentation? 

 

Thank you, 

 

Stefanita Vilcu

 

Solved by Oscar Linderoth

  • Solution

Hi Stefanita,

 

I wanted to do something similar with a few HC4's (also to run Kubernetes, incidentally :) ). I settled on this:

 

- Install authorized_keys in the image using customize-image.sh - https://docs.armbian.com/Developer-Guide_User-Configurations/#user-provided-image-customization-script

- SSH to each sbc after first boot, enter a root password and then cancel the rest of the setup script. It looked to me like the script does some important things before that point.

- Configure the rest with Ansible.

 

 

If you found a better way to boot non-interactively I'd be happy to hear!

 

Best regards,

Oscar

 

 

--- userpatches/customize-image.sh.default      2024-04-30 08:20:03.777276669 +0200
+++ userpatches/customize-image.sh      2024-01-28 23:46:07.822794026 +0100
@@ -36,6 +36,12 @@
                        # your code here
                        ;;
        esac
+
+       # install ssh keys
+       mkdir /root/.ssh
+       chmod 700 /root/.ssh
+       cat /tmp/overlay/id_ed25519.pub >> /root/.ssh/authorized_keys
+       chmod 600 /root/.ssh/authorized_keys
 } # Main
 
 InstallOpenMediaVault() {

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.