Sync the clock of a Linux embedded device with a PC

1

I have an embedded device running Ubuntu 14 and I want to sync its clock. The problem is that the device does not have internet and the setup is like this:

enter image description here

The embedded device is connected to a PC using Ethernet cable. The PC can SSH to the device and bring-up a terminal. With this assumption that the PC's clock is correct/synced, how can I sync the clock of the embedded device with the PC?

One possible solution that I thought of is to run a 'proxy server' on the PC and connect the embedded device to the Internet through the proxy. Then I can run ntp to sync the clock. The problem is that I can not run a 'proxy server' on the PC (due to some admin issues), so this solution is not doable for me.

ManiAm

Posted 2016-11-16T06:35:31.253

Reputation: 319

Can you run ntpd on the PC? Then the embedded device can sync with the PC directly. I know you can run ntpd as non-root user ntp, so I guess you can modify it to run under your user account as well (if the same admin issues prevent just installing ntpd). – dirkt – 2016-11-16T07:51:48.990

Answers

0

Use ssh's builtin socks proxy feature: ssh -D 1080 ...,, then you can access the whole internet from the embedded device via tsocks.

Ipor Sircer

Posted 2016-11-16T06:35:31.253

Reputation: 3 578