Hey all:
Pretty new to JAMF Casper and shell scripting but I am having an issue that probably has a simple fix. We have users connecting a server via SSH in Terminal in a computer lab. We recently replaced the server so the RSA key has changed. I want to script the removal of the old RSA key from users home directories (stored in /Users/(Insert Username Here)/.ssh/ and have it run once per user as a policy
When I run it as a policy, Casper tries to use the /var/root/.ssh as the working directory except I want the working directory for it to use as the current user's home directory.
The script I have runs as follows:
ssh-keygen -R (insert my server name here)
before that command runs I have tried to use cd and change it to $user and tried "$3" since that is a built in variable casper creates but the command continues to run from /var/root so it bombs out. Any advice on how to make sure Casper uses the current working directory would be appreciated
Thanks!