Cannot edit sshd_config as root
Code:
[ Cannot open file for writing: Permission denied ] I had edited and saved it before and added an extra listening port, however, noticed recently that the extra port was no longer working, and no longer was reflected in the sshd_config, also notice the date on the file remained that of date which it was last successfully edited. Code:
ls -lh /etc/ssh/ |
Are you sure you're editing the file as root, like in: sudo vim /etc/ssh/sshd_config?
Freddy Vulto http://fvue.nl |
This:
Code:
sudo vim /etc/ssh/sshd_config Code:
/etc/ssh/sshd_config" E212: Can't open file for writing |
Figured it out by reading other posts on this same forum....
lsattr & chattr (which I've only previously used in eggdrops) Code:
root@localhost:/etc/ssh# lsattr Code:
root@localhost:/etc/ssh# chattr -V -ia sshd_config Code:
root@localhost:/etc/ssh# lsattr Code:
root@localhost:~# chattr -V +ia /etc/ssh/sshd_config |
All times are GMT -5. The time now is 04:40 PM. |