0

When I attempt to edit '/etc/ssh/sshd_config', and save the file, I get an error saying: 'Could not save the file /etc/ssh/sshd_config. You do not have the permissions necessary to save the file.. Please check that you typed the location correctly and try again.' How do I get the permissions I need to save the file?

1
  • 2
    Use sudo. Create a new file in /tmp. Make sure it's what you want. Then cat /tmp/new-file | sudo tee /etc/ssh/sshd_config . Or just sudo vim /etc/ssh/sshd_config if you like living on the edge. Jul 5, 2019 at 18:27

2 Answers 2

0

Use sudo. Create a new file in /tmp. Make sure it's what you want. Then cat /tmp/new-file | sudo tee /etc/ssh/sshd_config. Thank you 'user:4530' William Pursell for posting the answer in the comments!

0

You may not a sudoer. First switch to root user with sudo -i command and edit the files that have root owner. Other way is to use with sudo command if your user has permission to edit this file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .