SSH configuration is getting erased after multiple Power shutdown's and restart.

gnanamsc

New Member
Joined
May 19, 2023
Messages
12
Reaction score
0
Credits
105
Hello,
We have a two pc connection architecture, Out of which one is windows 10 and the other is the linux/ubutnu. And we are accessing ubuntu/linux pc via windows using "Bitwise" 3rd party software.
For the communication to be enabled between linux and windows, there is a SSH key is created by Bitwise software and the same is stored in linux/ubuntu PC.

At sites because of multiple power failures and restart, The SSH key which is stored in linux /ubutnu is getting erased automatically.

Any idea what is the causing this issue and how do we prevent this even power shutdown happens.
 


Obvious possible reason is the Ubuntu image you're using isn't actually an installed system, but mounted as RO/squash & thus changes are lost on reboot. The other main reason would be a choice of the installer or person who configured it (ie. intentionally made non-persistent).

You've asked this question before elsewhere, but haven't provided Ubuntu product & release details, thus this comment is generic only (ie. not geared for any specific Ubuntu product & release as unknown).
 
Hello , nope i have not asked this question else where.

We are using Ubuntu 20.04 version desktop version. And it is installed by vendor who ships the MicroPC.
 
Obvious possible reason is the Ubuntu image you're using isn't actually an installed system, but mounted as RO/squash & thus changes are lost on reboot. The other main reason would be a choice of the installer or person who configured it (ie. intentionally made non-persistent).

You've asked this question before elsewhere, but haven't provided Ubuntu product & release details, thus this comment is generic only (ie. not geared for any specific Ubuntu product & release as unknown).
Hi, Nope i have not asked this question else where,

We are using ubuntu desktop installer 20.04 version. And it is installed by the micropc Vendor who ships the PC.

I am new to Linux, and i am unaware of the things which you have mentioned. can you please provide more details?
"Obvious possible reason is the Ubuntu image you're using isn't actually an installed system, but mounted as RO/squash & thus changes are lost on reboot. The other main reason would be a choice of the installer or person who configured it (ie. intentionally made non-persistent)."
 
Obvious possible reason is the Ubuntu image you're using isn't actually an installed system, but mounted as RO/squash & thus changes are lost on reboot. The other main reason would be a choice of the installer or person who configured it (ie. intentionally made non-persistent).

You've asked this question before elsewhere, but haven't provided Ubuntu product & release details, thus this comment is generic only (ie. not geared for any specific Ubuntu product & release as unknown).
I would like to understand, how to make it persistent?

Further i like to understand how are you saying it is not an installed system?

And what do you mean RO/Squash? how to identify on the installed system?

Please help me with the above details.
 
You've asked this question before elsewhere, but haven't provided Ubuntu product & release details, thus this comment is generic only (ie. not geared for any specific Ubuntu product & release as unknown).

I wrote that, yet I'm not sure what I was trying to say. Thus I apologize.. I likely was saying the question read to me like I'd seen the question before (I scan many sites), but either way I don't recall & my language is so poor I have difficulty reading my intent! Sorry.

We are using ubuntu desktop installer 20.04 version. And it is installed by the micropc Vendor who ships the PC.

Ubuntu 20.04 & desktop, and as I understand it you're using an OEM install.
Further i like to understand how are you saying it is not an installed system?

And what do you mean RO/Squash? how to identify on the installed system?

Most people download Ubuntu at https://cdimage.ubuntu.com/ which means they'll download an ISO file which is written to media (normally a USB thumb drive) which they then boot & install from (install to their local disk be it hdd or ssd).


The ISO contains files necessary to boot the system & let the user start the installer, but the install system copies files from a squashfs (squashed file-system) contained on the media; it's RO or read only so it cannot be corrupted/changed, with the system they're using booted from that installation media running from RAM, ie. when they shutdown/reboot; nothing is saved (except if they saved it to other drives OR actually performed an install where by they'll have a new installed image they can boot into).

ie. after downloading the ISO & writing to media; when that media is booted they are using a RO or read only system that allows them to install; or just that system as if installed... Changes made are for the current session, and lost on reboot. I obviously assumed you were doing this.

I no longer think this is what you're trying to do, or have issues with.

My suspicion (now) is you're not doing a clean shutdown, thus on next boot an unclean file-system is detected, a fsck or file-system check (using whatever command is appropriate for your unstated file-system(s), and any required corrections made; if no sync was done, then some data that existed only in RAM & wasn't written to disk won't be found after reboot - ie. saved configs can get lost.

This should not happen, alas if the system wasn't shutdown properly it can (and power loss is an unclean shutdown). The user fix to some of this is ensuring any buffers of saved data that exists in RAM is written to disk (ie. force sync yourself) on changes.

I don't know your bitwise/3rd party software, thus aren't commenting on it. You can cleanly shutdown a Linux system using SysRq commands direct to the kernel, however that does require local access (and Linux running on system with real keyboard; onscreen keyboards won't; however some iLO/iDRAC/.. systems can allow simulation of this remotely too)
 

Members online


Latest posts

Top