I change this file
~/.ssh/authorized_keys in remote server, shown below, and want to run a script when ssh to it.
command="/home/path/to/script" ssh-rsa my-key
now if I run
ssh $USER@$HOST x1 x2 x3, it works fine, however, if I run
scp path/to/file $USER@$HOST:path/to/file, it does not work...
what is the problem? How can I make it work?