I want to SSH to a server and execute a simple command like \"id\" and get the output of it and store it to a file on my primary server. I do not have privileges to install
If you're using backticks try this:
my @output = `ssh root@1.1.1.1 "which perl"`; print "output: @output";
This is only useful if you have a publickey that the above command won't prompt for password.