scp w/ forced command - official?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I am new to this group and do not have much experience with ssh yet.

What I want to do is copy files from a remote box in unattended batch
jobs. To do this, a way that is sometimes recommended is: use a key
without passphrase, and bind the key on the remote machine to a forced
command. This forced command should be a script that sends the files
using the scp -f option.

You do the transfer by submitting an scp command using that key, putting
anything you want to communicate to the remote script into the filename
portion. The remote command can access that using an environment variable.

I tried this, and it works fine for me, but what bothers me is that the
-f option of scp is undocumented and internal. Is it ok to use it anyway
or do I risk that later versions will break my setup? Is there a more
"official" way to perform my task?


Site Timeline