I have a server which has dual authentication layer. Meaning first a user has to login to the box using his userid and then use a group id to access the development folder (say). Now I have a script which uses ssh to copy a file to the development folder. What should be the command for this?
Normal ssh commands such as as
ssh $user@host $cmd where
$cmd is something like
cp ~user/Test.txt ~grp/ won't work because we are using user's id to copy to group's directory which is not allowed. And if we use group id to login it will be denied permission. Any suggestions?