SSH: How to change value in config file in one command
        Posted  
        
            by 
                Brian Graham
            
        on Super User
        
        See other posts from Super User
        
            or by Brian Graham
        
        
        
        Published on 2014-05-27T21:52:16Z
        Indexed on 
            2014/05/31
            3:32 UTC
        
        
        Read the original article
        Hit count: 505
        
How can I change the value of, let's say, PasswordAuthentication in /etc/ssh/sshd_config in commands?
As well, remove a # in front of the "key" I wish to value. These don't all have to be in one command. I setup quite a few servers, and remembering where everything is gets exhausting, so I want to get a series of commands I can copy paste and it does the work for me for future reference.
Sample values:
PermitRootLogin no
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
UseDNS no
© Super User or respective owner