Uneschewed

Member
May 13, 2019
16
0
1
Missouri
cPanel Access Level
Root Administrator
Hello,

I am trying to create a post provisioning script to run after my server runs and everything is installed.

I have created the following code:

#!/bin/bash
### export PATH ###
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
echo "$PATH"
/usr/bin/sed -i 's/#\?\(PermitRootLogin\s*\).*$/\1 no/' /etc/ssh/sshd_config
/usr/bin/sed -i 's/#\?\(PasswordAuthentication\s*\).*$/\1 no/' /etc/ssh/sshd_config
/usr/bin/sed -i 's/#\?\(PermitEmptyPasswords\s*\).*$/\1 no/' /etc/ssh/sshd_config
service sshd restart

I have a very basic setup with Linux. The code does not run though when I try to load it from github at the following address:

- Removed -

What type of construct do I require to make the code change the sshd_config to the following parameters: no
 
Last edited by a moderator: