[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Limiting ssh usage on remote machine.
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: Limiting ssh usage on remote machine.
- From: Camiel Dobbelaar <cd_(_at_)_sentia_(_dot_)_nl>
- Date: Fri, 12 Dec 2003 09:52:38 +0100 (CET)
On Fri, 12 Dec 2003, Tom wrote:
> > Try this as the command in your authorized_keys on the secondary, to make
> > the update atomic:
> > command="scp -t -p data.tmp && mv data.tmp data.cdb"
> > And the master does this to push updates:
> > scp -i dnsdata.pkey -p -q data.cdb dnsdata_(_at_)_secondary:
> > No random name, but this does not hurt as you have only 1 master.
> > Note the usage of '-t': whatever name you pick on the master, the file on
> > the secondary will always be called 'data.tmp'.
> what does the -t option do? i cannot find -t in
It's an undocumented (on purpose) option. It tells scp that it is the
receiving end of the connection. It's just how scp works under the
hood. (try a 'ps -waux' on a machine that is on the receiving side
of an scp connection)
The trick with the command above is that it does not care about the
arguments that the other side tries to send him. It will always start scp
in receive mode, using always the same filename.
Visit your host, monkey.org