Automatically set date on remote ssh machine

0

I have an offline computer with no internal battery (Jetson: mini computer) that is routinely shut off and looses the current date/time. Shortly after it boots up every time, it receives a direct ssh connection for various tasks.

I'm looking for a way to configure it so that every time it receives an ssh connection, it automatically syncs it's clock to match that of the computer connecting to it. Failing this, at least a script that syncs the time so one can just ssh in and run it.

Blaine

Posted 2019-04-19T07:54:39.717

Reputation: 1 477

This requires more info - Can it ssh back to the machine that is connecting to it? Are you able to run an ntp server on another system in is attached to ? By offline, do you mean its often off, or when its online it does.not have full connectivity- if the latter, what connectivity dies it have? Can you.modify the system ssh'ing.into it to run an additional comand? – davidgo – 2019-04-19T08:34:48.447

@davidgo No, I don't believe it can ssh into the connecting machine. An ntp server will also not be possible. It never has internet connectivity, when we connect to it we do so over a direct Ethernet cable. We should be able to modify the system sshing in. – Blaine – 2019-04-20T20:36:12.997

No answers