more specific grep pattern
This commit is contained in:
		
							parent
							
								
									9e8d93d4ea
								
							
						
					
					
						commit
						31b912b2c9
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								makeitso
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								makeitso
									
										
									
									
									
								
							|  | @ -10,7 +10,7 @@ if [ ! -d /home/authorizedkeysuser ]; then | |||
|   sudo useradd -c 'User for AuthorizedKeysCommand' -d /home/authorizedkeysuser -m -s/usr/sbin/nologin authorizedkeysuser | ||||
| fi | ||||
| 
 | ||||
| grep -q AuthorizedKeysCommand /etc/ssh/sshd_config || \ | ||||
| grep -qF 'AuthorizedKeysCommand /etc/ssh/get_authorized_keys' /etc/ssh/sshd_config || \ | ||||
| sudo sh -c "echo 'Match User $1 | ||||
|   AuthorizedKeysCommand /etc/ssh/get_authorized_keys | ||||
|   AuthorizedKeysCommandUser authorizedkeysuser' >> /etc/ssh/sshd_config" | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue