Skip to content

How to install MerryIOT Firmware and get SSH Access on PantherX2 Devices

Notifications You must be signed in to change notification settings

sicXnull/pantherx2_merryiot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 

Repository files navigation

How To: PantherX2 Running Browan/Merryiot Firmware

  • Download Balena Etcher Download
  • Download Browan image Download
  • Flash Browan image to SD Card

SSH Access

Generate a SSH key. Windows Linux MacOS

  • Make note of the private key that’s been generated. Linux - cat /path/to/your/private/key Windows - Puttygen
  • Mount Browan SD card to a Linux/MacOS machine.
  • Navigate to the root/.ssh directory of the SD card (as root). Example cd /media/sic/0e2c42bf-d359-42fc-b24d-7565e9b5e2d5/root/.ssh
  • Open authorized_keys (sudo nano authorized_keys) file, paste your SSH key in the second line.
  • Insert SD card back into Miner
  • SSH into Merryiot miner with attached SSH public key.
  • Windows - Putty Instructions
  • Linux/Mac - ssh -p 168 -i /path/to/your/private/key root@miner-ip

How to Keep SSH Access After Updates

  • Update Packages sudo apt update
  • Install Nano sudo apt install nano
  • Navigate to ssh config file sudo nano /etc/ssh/sshd_config
  • Change PasswordAuthentication from no to yes. Optional - Change port to 22 if you desire. Save file
  • Restart SSH sudo systemctl restart ssh
  • Modify file permissions so it is not overwritten by OTA updates sudo chattr +i /etc/ssh/sshd_config
  • Set root password. sudo passwd root
  • Modify file permissions so it is not overwritten sudo chattr +i /etc/passwd /etc/shadow

How to fix MAC Address

  • For some reason, the browan image comes hardcoded with a MAC address different than your machines. To correct this:
    • Note your device MAC address
  • Install macchanger sudo apt update && sudo apt-get install macchanger
  • Select No to changing MAC automatically
  • Create the following file by running sudo nano /etc/network/if-pre-up.d/change_mac_address
    • Paste the following (be sure to change < your:mac:address >):
#!/bin/bash

# Log file path
LOG_FILE="/var/log/change_mac_address.log"

/usr/bin/macchanger -m your:mac:address eth0 >> "$LOG_FILE" 2>&1

# Check the exit status of the macchanger command
if [ $? -ne 0 ]; then
   echo "Failed to change MAC address. See $LOG_FILE for details." >&2
fi
  • Save file
  • Make script executable sudo chmod +x /etc/network/if-pre-up.d/change_mac_address
  • Prevent updates from deleting this fix sudo chattr +i /etc/network/if-pre-up.d/change_mac_address
  • Reboot

Force OTA Update

To update to the latest firmware, ensure all of the above has been completed. Then run /usr/local/sbin/gw_ota stable

About

How to install MerryIOT Firmware and get SSH Access on PantherX2 Devices

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published