SolarIs 11 VM configure sftp. After restart ssh, the sshd_config file resets?

19 Views Asked by At

How do i avoid this happening, i need the sshd_config file to contain

Subsystem    sftp  /usr/lib/ssh/sftp-server


root@uln-pca-oracle-solaris-11-2023-10-16fqbbqv:/export/home/opc# echo "Subsystem    sftp  /usr/lib/ssh/sftp-server" >> /etc/ssh/sshd_config

root@uln-pca-oracle-solaris-11-2023-10-16fqbbqv:/export/home/opc# ls -ltr /etc/ssh/sshd_config

-rw-r--r--  1 root   sys     2435 Mar 27 12:11 /etc/ssh/sshd_config

But when i restart the contents reset. Ive even tried changing permissions so that the kernel cant get at it

root@uln-pca-oracle-solaris-11-2023-10-16fqbbqv:/export/home/opc# chmod 444 /etc/ssh/sshd_config

root@uln-pca-oracle-solaris-11-2023-10-16fqbbqv:/export/home/opc# ls -ltr /etc/ssh/sshd_config

-r--r--r--  1 root   sys     2435 Mar 27 12:11 /etc/ssh/sshd_config

root@uln-pca-oracle-solaris-11-2023-10-16fqbbqv:/export/home/opc# svcadm restart ssh                  root@uln-pca-oracle-solaris-11-2023-10-16fqbbqv:/export/home/opc# ls -ltr /etc/ssh/sshd_config

But she still manages to get reset including permissions

-rw-r--r--  1 root   sys     2386 Mar 27 12:11 /etc/ssh/sshd_config
0

There are 0 best solutions below