We have a server 'x'. We want a setup in which a user 'test' should scp a file 'f' to server 'x' then should login to the server(using ssh) and run a script 'test.sh' which does some operations on file 'f'. We dont want to give shell access to user 'test' . Is this possible?
I tried modifying /etc/passwd file on the server. Instead of /bin/bash, i tried giving the script name test.sh. This way when 'test' logs in, it executes the script and then connection gets closed. But with this approach i am not sure how can i make the user to scp the file 'f' to server? 'f' is a text file.