Похожие чаты

Hi , need some help i want to edit file

sshd_config using sed and i wrote this script
sed -i -r -e 's/.*#.*(PubkeyAuthentication)[[:space:]]+no.*/\1 yes/gI' /etc/ssh/sshd_config
sed -i -r -e 's/#AuthorizedKeysFile/AuthorizedKeysFile/g' /etc/ssh/sshd_config
sed -i -r -e 's/.*#.*(PermitRootLogin)[[:space:]]+prohibit-password.*/\1 no/gI' /etc/ssh/sshd_config
sed -i -r -e 's/.*#.*(PasswordAuthentication)[[:space;]]+yes/\1 no/gI' /etc/ssh/sshd_config

run it and got this error :

sed: -e expression #1, char 55: unterminated `s' command

what did i do wrong ?

1 ответов

4 просмотра

Easy, you're trying to automate something with bash which should be left to ansible.

Похожие вопросы

Карта сайта