Topic: sudo question
is it possible to run commands like this with sudo?
echo "ssh-rsa AAAAAAAA=" > /home/larz/.ssh/authorized_keys
the part of the command that needs sudo isn't the echo, but writing it to the file in another user's directory. as a result, this doesn't work:
% sudo echo "ssh-rsa AAAAAAAA=" > /home/larz/.ssh/authorized_keys
[zsh: permission denied: /home/larz/.ssh/authorized_keys]
Last edited by lucas (2009-08-12 07:24:26)