--- ssh_howto.txt 2002/06/28 09:32:26 1.1 +++ ssh_howto.txt 2002/12/09 15:08:03 1.4 @@ -1,5 +1,5 @@ -How to setup remote, non-interactive, logon with multiple command for -same remote username? +How to setup remote, non-interactive, log-on with multiple command for +same remote user-name? For the rest of this document, destination host will be called 'loophole', and @@ -10,7 +10,7 @@ $ ssh-keygen -t dsa -f ~/.ssh/uptime -Append ~/.ssh/uptime.put on destination host to ~mole/.ssh/authorized_keys2 +Append ~/.ssh/uptime.pub on destination host to ~mole/.ssh/authorized_keys2 and prepend following before ssh-dss: command="uptime" @@ -21,7 +21,7 @@ test if it works... -$ ssh -i ./uptime -q -l mole loophole +$ ssh -i ~/.ssh/uptime -q -l mole loophole 15:42:10 up 42 days, 18:25, 6 users, load average: 0.00, 0.00, 0.00 It does? Oh, good. You now know how to setup individual keys for each @@ -29,3 +29,11 @@ permissions on loophole to execute that particular command, but other than that, you are winner! +If you get one more line before uptime output, try adding -T option +to ssh. This will prevent pseudo tty allocation and (hopefully) remove +that output. + +If you are stuck with ssh v1 protocol, you have to use rsa1 instead of +dsa for ssh-keygen and authorized_keys instead of authorized_keys2. + +But, think about upgrading.