SSH: How to change value in config file in one command
- by Brian Graham
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