Sample Header Ad - 728x90

Can't unlock file on mac

2 votes
1 answer
315 views
On my mac I can't edit
~/.ssh/known_hosts
manually because it is locked. Right-click -> Get Info, the "Locked" radio button is not clicked, but the file still remains locked: attemps to manually edit it in TextEdit result in a pop-up window appearing saying: >The file "known_hosts" is locked. If you want to make changes to this document, click unlock. Clicking "unlock" in the pop-up window produces another pop-up window which says: >The file "known_hosts" cannot be unlocked. You can duplicate this document and edit the duplicate. When I cd to .ssh folder, these commands in terminal have also failed to unlock the file:
$ sudo chflags nouchg,noschg "~/.ssh/known_hosts"
$ sudo chflags nouchg,noschg ~/.ssh/known_hosts
$ sudo chflags nouchg,noschg "known_hosts"
$ sudo chflags nouchg,noschg known_hosts
-l ~/.ssh/known_hosts
yields
-rw-r--r--@ 3 Baz  staff  4779  3 Jun  2016 /Users/Baz/.ssh/known_hosts
I don't know where to go next. How do I unlock
~/.ssh/known_hosts
?
Asked by Bazley (161 rep)
Jul 25, 2024, 11:01 AM
Last activity: Jul 25, 2024, 10:28 PM