[ntp:questions] Reference Clock driver for getting time via "date" command over telnet?

unruh unruh at wormhole.physics.ubc.ca
Wed Apr 21 16:40:36 UTC 2010

On 2010-04-21, Movis <ben at internetaddress.com> wrote:
> Hello,
> For reasons outside my control, I wish to configure ntpd on Red Hat to
> use as the refclock a time obtained by repeatedly telnetting to a
> remote machine and using the "date" command.

That is NOT how ntp works. And it is silly.

> In other words, I will have a string from a script which would then be
> given to my local ntp server as the reference clock. I do not have the
> option of opening a port forwarding tunnel or vpn over which to use
> ntp between these two servers.

Good luck. No one is going to write it for you. It is up to you. 

> My first thoughts centre on some kind of virtual serial device into
> which I could pipe / echo a formatted string containing that date
> output along with the local clock time to emulate a clock, and
> configuring ntp to use that virtual serial device as its refclock.
> However, I do not know how to construct something like that in linux.
> My programming experience is next to nothing and I would prefer to
> achieve this using some scripting method.
> I know it's a fudge and it doesn't take into account the variable time
> it would take to execute the date command, or for network delays.
> However, this would be infinitely better than nothing, and telnet it
> is the only mechanism by which I can communicate, in this instance to
> the remote machine.

You know this how? (and that statement is lunacy is you say it is for
security reasons, since telnet is totally insecure.)

> Could anyone help me put something together which ntpd would accept as
> a clock source?

Why would they? Noone else in the world would be interested in this.
If you are willing to put a few thousand dollars up front, I am sure
someone would take it on for you. 

> Thanks in advance,
> Movis

More information about the questions mailing list