Skip to content

Commit

Permalink
Fix quotes for Configuring SSH for Public Key Authentication
Browse files Browse the repository at this point in the history
Double quotes to single quotes for:

sudo sed -i 's/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g' /etc/ssh/sshd_config
  • Loading branch information
tenthirtyam committed Jul 16, 2021
1 parent e768d15 commit d51c342
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/linux/centos-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sudo rm -rf /tmp/id_ecdsa.pub
### Configure SSH for Public Key Authentication. ###
echo '> Configuring SSH for Public Key Authentication ...'
sudo sed -i '/^PermitRootLogin/s/yes/no/' /etc/ssh/sshd_config
sudo sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
sudo sed -i 's/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g' /etc/ssh/sshd_config

### Restart the SSH daemon. ###
echo '> Restarting the SSH daemon. ...'
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/photon-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sudo rm -rf /tmp/id_ecdsa.pub
### Configure SSH for Public Key Authentication. ###
echo '> Configuring SSH for Public Key Authentication ...'
sudo sed -i '/^PermitRootLogin/s/yes/no/' /etc/ssh/sshd_config
sudo sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
sudo sed -i 's/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g' /etc/ssh/sshd_config

### Disable and clean tmp. ###
echo '> Disabling and clean tmp ...'
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/redhat-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ sudo rm -rf /tmp/id_ecdsa.pub
### Configure SSH for Public Key Authentication. ###
echo '> Configuring SSH for Public Key Authentication ...'
sudo sed -i '/^PermitRootLogin/s/yes/no/' /etc/ssh/sshd_config
sudo sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
sudo sed -i 's/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g' /etc/ssh/sshd_config

### Restart the SSH daemon. ###
echo '> Restarting the SSH daemon. ...'
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/rocky-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sudo rm -rf /tmp/id_ecdsa.pub
### Configure SSH for Public Key Authentication. ###
echo '> Configuring SSH for Public Key Authentication ...'
sudo sed -i '/^PermitRootLogin/s/yes/no/' /etc/ssh/sshd_config
sudo sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
sudo sed -i 's/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g' /etc/ssh/sshd_config

### Restart the SSH daemon. ###
echo '> Restarting the SSH daemon. ...'
Expand Down
2 changes: 1 addition & 1 deletion scripts/linux/ubuntu-server-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ sudo rm -rf /tmp/id_ecdsa.pub
### Configure SSH for Public Key Authentication. ###
echo '> Configuring SSH for Public Key Authentication ...'
sudo sed -i '/^PermitRootLogin/s/yes/no/' /etc/ssh/sshd_config
sudo sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config
sudo sed -i 's/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g' /etc/ssh/sshd_config

### Restart the SSH daemon. ###
echo '> Restarting the SSH daemon. ...'
Expand Down

0 comments on commit d51c342

Please sign in to comment.