1

For example, I often need to login to a new virtual machine just to open "/etc/ssh/sshd_config" and set "PasswordAuthentication" option to "no".

In this way, I can not automate this process.

How to solve similar tasks by doing the modification from the command line?

1

sudo sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/ssh_config

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.