PermitRootLogin yes should go to /etc/ssh/sshd_config
This commit is contained in:
		
					parent
					
						
							
								a994b4cf1a
							
						
					
				
			
			
				commit
				
					
						d7ada99c7a
					
				
			
		
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -16,6 +16,7 @@ rdnssd -u root -r /etc/resolv.conf | |||
| 
 | ||||
| ssh_authorized_keys_path='/root/.ssh/authorized_keys' | ||||
| ssh_config_path='/etc/ssh/ssh_config' | ||||
| sshd_config_path='/etc/ssh/sshd_config' | ||||
| # Initial Package Intallation | ||||
| if [ [ $(get_distro) = "alpine" ]; then | ||||
| 	apk update | ||||
|  | @ -26,8 +27,8 @@ if [ [ $(get_distro) = "alpine" ]; then | |||
| 		echo "PasswordAuthentication no" >> $ssh_config_path | ||||
| 	fi | ||||
| 	 | ||||
| 	if ! grep -q "PermitRootLogin yes" $ssh_config_path; then | ||||
| 		echo "PermitRootLogin yes" >> $ssh_config_path | ||||
| 	if ! grep -q "PermitRootLogin yes" $sshd_config_path; then | ||||
| 		echo "PermitRootLogin yes" >> $sshd_config_path | ||||
| 	fi | ||||
| 	service sshd restart | ||||
| else | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue