Last active
September 10, 2021 10:15
-
-
Save wvreeven/05bac7b5682a946cd7b9c3192db70746 to your computer and use it in GitHub Desktop.
Add your public openssh key to ASIAIR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unlike other instructions found on the internet, these ones do not use the root user. In general you should NOT use the | |
root user on Linux. Use the pi user on ASIAir instead. If root access is needed then use the sudo command. | |
You will need to mount the partitions onn the SD card with write access. This is easy under Linux but not everyone uses | |
that. Unfortunately both Windows and Mac do not natively support writing to the Linux ext4 file system. There are paid | |
solutions for Windows but since I am not a Windows user, I didn't try those. I am on a MacBook myself so I have set up a | |
Linux VM in VirtualBox and gave that permissions to access the USB card reader containing the SD card. I chose Ubuntu | |
20.04 but of course you're free to choose whatever distro you prefer. | |
There are four partitions on the SD card: | |
- /boot -> FAT32 | |
- / -> ext4 | |
- /home/pi -> ext4 | |
- swap | |
Most Linux distros should auto-mount the partitions on the SD card. If not then you'll need to mount the /home/pi | |
partition manually. The auto-mounted partitions will be accessible in the /media/<username> folder on Ubuntu. If you | |
use a different distro, like RedHat or CentOS, then the mount points may be somewhere else. | |
You will see the auto-mounted partitions with very cryptic names like 4c88dd0f-c57a-4c34-b048-29c01b7724da which are | |
completely meaningless. Well, to me they are. So you need to inspect the contents of those directories to see which one | |
is the /home/pi partition. You can recognize it by the presence of an ASIAIR directory. | |
The /home/pi partition also contains a hidden directory called .ssh (mind the dot at the start of the filename). You can | |
see all hidden folders and files by using the ls -alF command in the partition mount point. Inside the .ssh directory | |
you'll find a file called authorized_keys and you need to add your public openssh key to that file. While you are at it, | |
remove the existing key or keys in the file. Those are of the ZWO developers and it is not very nice that they left them | |
on the SD card. | |
Once done you can unmount the partitions and then eject the SD card. Next bot up the ASIAir, get it's IP address via the | |
app and then you can use any computer with openssh and with the corresponding openssh private key to connect to the | |
ASIAir. | |
Note: do NOT try to update the Raspbian OS on the ASIAir. It is very, very old (a kernel from 2019) and any attempt to | |
update the OS will break it, meaning that you will need to restore the SD card. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment