5

I tried editing the /etc/ssh/ssh_config file on my Mac to change the forwardX11 from no to yes, and this to enable X11 features.

I try to change permission in the file ssh_config and in the folder etc, I did it, but in vain; still no permission to go inside the file to change something.

6
  • Welcome to Ask Different :) How are you accessing the file? Which editor are you using?
    – Nimesh Neema
    Nov 24, 2018 at 13:53
  • I use simply TextEdit Nov 24, 2018 at 13:55
  • Are you comfortable using vim in the Terminal?
    – Nimesh Neema
    Nov 24, 2018 at 13:56
  • Can you run ls -ld /etc /etc/ssh_config /etc/ssh /etc/ssh/ssh_config and paste the result into the question? And add the specific error message you get as well (screenshot).
    – nohillside
    Nov 24, 2018 at 13:57
  • 1
    "I try to change permission in the file ssh_config and in the folder etc, I did it, but in vain..." You should not change the permissions for /etc or for /etc/ssh_config. You should use sudo as you have shown in your answer :)
    – Seamus
    Oct 6, 2020 at 23:21

2 Answers 2

6

I find the answer, with this line in Terminal :

sudo nano -w /etc/ssh/ssh_config 
3

You should be editing ~/.ssh/config anyway. Modern versions of Mac OS will back out any changes you do to /etc/ssh/ssh_config upon reboot.

3
  • On reboot or OS updates?
    – nohillside
    Feb 22, 2021 at 16:49
  • @nohillside Reboot (as of the updates last year to Catalina)
    – Bert
    Feb 22, 2021 at 17:53
  • Strange.Just tested with Big Sur, custom changes in /etc/ssh/ssh_config remained after a reboot. Upgrades tend to undo changes in /etc so it's a good idea to keep changes somewhere else anyway.
    – nohillside
    Feb 23, 2021 at 8:06

This site is temporarily in read-only mode and not accepting new answers.

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