in reply to running setuid for ssh ?

Well... you can probably get a suid script to do almost anything, but since ssh already has its own, more fine-grained, user controls (including auto login facilities on a per-user, per-remote account basis) I'm not sure why you'd want to use suid at all.

update: if you want to go the quick (and arguably insecure) route, you could just share the relevant ssh key with each user that needs to use the script. In the real world, you will probably want a separate key for each user. Also note that there are issues with suid (perl)scripts on some systems.