0

The file I want to modify belongs to root. I want to change this file with a sudo-er

sudo sed -i 's/Accept .* LC_\*$/& GIT_*/' /etc/ssh/sshd_config

(trying to append GIT_* to the Accept sshd config directive)

But the file remains unchanged:

$ grep Accept /etc/ssh/sshd_config 
AcceptEnv LANG LC_*
0

You missed .* after Accept:

sudo sed -i 's/Accept.* .* LC_\*$/& GIT_*/' /etc/ssh/sshd_config
1
  • That is partly true. That was supposed to be a white space Accept\w.* (and since there was a tab, that was the problem) Thanks! – Gabriel Petrovay Oct 14 '13 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.