ssh anomaly perhaps or maybe I just dont understand
I have some scripts in /root/Startup on my PC machine which are executed on boot by root. Stuff like mounting disks, starting mysql, nginx, and checking if they are running, etc
However, when I ssh into the PC machine from another machine (laptop) as puppy@remotehost these same root scripts execute as puppy after I have entered puppy's password. These scripts have permissions 744 in their scripts directory (so should not run as puppy) but have 777 as links in /root/Startup to this scripts directory.
Even when I login as puppy (from root) on the source laptop machine, and then ssh to the remote PC machine to puppy@remotehost I still get the ssh session executing the root/Startup scripts.
These scripts do not execute if I login as puppy on the remote host PC machine, as puppy has its own Startup directory under /home/puppy/ .
I suppose this could all happen if the ssh session logs in as root and then logs in as puppy afterwards, but I do not want the root/Startup scripts to execute. How do I achieve that please?
I am not expecting this to happen, can someone explain what is going on please?
( I dont think I am being stupid but it is always possible I have overlooked something !)
Thanks,
Paul
(Have I totally confused you all now??)