You can specify which command is used in the authorized key file on the server (this overrides the command the user supplies). According to man sshd
(section AUTHORIZED_KEYS FILE FORMAT):
command="command"
Specifies that the command is executed whenever this key is used
for authentication. The command supplied by the user (if any)
is ignored. The command is run on a pty if the client requests
a pty; otherwise it is run without a tty. If an 8-bit clean
channel is required, one must not request a pty or should spec‐
ify no-pty. A quote may be included in the command by quoting
it with a backslash. This option might be useful to restrict
certain public keys to perform just a specific operation. An
example might be a key that permits remote backups but nothing
else. Note that the client may specify TCP and/or X11 forward‐
ing unless they are explicitly prohibited. The command origi‐
nally supplied by the client is available in the
SSH_ORIGINAL_COMMAND environment variable. Note that this
option applies to shell, command or subsystem execution. Also
note that this command may be superseded by either a
sshd_config(5) ForceCommand directive or a command embedded in a
certificate.
Put in the authorized_keys
file:
command="scp -t -- /var/tmp" ssh-rsa ......
This force a command scp some_file user@server:/some/directory
on client to
create /var/tmp/some_file
on server.
Check that the user cannot overwrite ~/.ssh/authorized_keys
on the server!
You can make more restrictions, allowing only from a certain client. I use:
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,command="scp...