Update prep-server.sh

if variable in sed then replace ' by "
This commit is contained in:
cedricAbonnel 2020-05-17 13:43:07 +02:00 committed by GitHub
parent 5fc2b17e92
commit bd49861d98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ SSH_PORT=$((1000 + RANDOM % 9999))
printMessage "\n[NFO] Le port SSH est désormais le $SSH_PORT"
sed -i 's/#\?\(Port\s*\).*$/\1 $SSH_PORT/' /etc/ssh/sshd_config
sed -i "s/#\?\(Port\s*\).*$/\1 $SSH_PORT/" /etc/ssh/sshd_config
sed -i 's/#\?\(PerminRootLogin\s*\).*$/\1 no/' /etc/ssh/sshd_config
sed -i 's/#\?\(PubkeyAuthentication\s*\).*$/\1 yes/' /etc/ssh/sshd_config
sed -i 's/#\?\(PermitEmptyPasswords\s*\).*$/\1 no/' /etc/ssh/sshd_config