I’m trying to add public ssh keys into ~/.ssh/authorized_keys.
Getting errors like ‘Read-only’ etc when I try to create and try to save the file, how do you generate and add your public ssh keys on ZimaOS?
I generated keys in the /DATA folder, want to copy them into ~/.ssh/authorized_keys but am met with again ‘Read-only’.
Update
You can override the given AuthorizedKeyFile to point to a diff ssh location and setup.
However so far the stored public keys aren’t found when I try to SSH from putty, IDE or terminal.
There are multiple people invested in this endeavour so far wanting to self-host using Casa/ZimaOS.
The risks that come with it are for the people that do that and/or have the proper insurance for it. This is not a problem IceWhale should identify as ‘their problem’.
I also wanna give out that I have been receiving very negative and criticizing (almost personal attack) responses because we are trying to get Coolify to work properly on ZimaOS and the ZimeCube Pro. I have reported this to the mods and I discourage any form of even thinking of breaking discord or forum rules.
i would like if they could add an easy way of adding ones ssh key like with the “ssh-copy-id” tool or via webui.
reason for me is i would like to create an user that could rsync to a zimaos directory easily and from with ssh rsync with locally created ssh keys, so locally available ssh-copy-id tool or again could be via webui to remote host.
For anyone, who would like to actually make it work, at least on ZimaOS 1.7, here a quick step-by-step.
On the client machine, generate the key pair: ssh-keygen -t ed25519
Find the id_ed25519.pub file (on Linux it’s usually in ~/.ssh directory), and view its content: cat id_ed25519.pub. Copy the content for later.
Connect with the ZimaOS using ssh: ssh your-zimaos-username@zimaos-ip-address
Go to /etc/ssh and create a file authorized_keys. Paste the content of the id_25519.pub file into the authorized_keys file and save it.
Open the sshd_config file: sudo nano /etc/ssh/sshd_config and set the following values:
AuthorizedKeysFile /etc/ssh/authorized_keys
PasswordAuthentication no
KbdInteractiveAuthentication no
UsePAM no
PermitRootLogin no (should be set to “no” by default)
PermitEmptyPasswords no (should also be set to “no” by default)
Restart the SSH service: sudo systemctl restart sshd
Reconnect to the ZimaOS with ssh. This time it should not require password.
If anything goes wrong, you can still access the server via ssh by going to the ZimaOS WebUI > Settings > General > Developer mode > View > Web-based terminal