Solaris shd\_config File: Reset, Restart sshd, Prevent Subsystems (ftp/usr/lib/ssh/sftp-server)
This article focuses on the Solarishd\_config file, providing a detailed explanation of how to reset, restart the sshd service, and prevent specific subsystems (ftp/usr/lib/ssh/sftp-server) from running. The content is structured with subtitles and paragraphs, using appropriate HTML tags, and code blocks are enclosed within tags with proper formatting.
Introduction
The Solaris Secure Shell Daemon (sshd) configuration file, located at /etc/ssh/sshd\_config, contains settings that control the behavior of the sshd service. In this article, we will explore how to reset, restart the sshd service, and prevent the ftp/usr/lib/ssh/sftp-server subsystem from running.
Resetting the sshd\_config File
To reset the sshd\_config file to its default settings, follow these steps:
- Backup the existing sshd\_config file:
# cp /etc/ssh/sshd\_config /etc/ssh/sshd\_config.backup
- Restore the default sshd\_config file:
# svccfg -s svc:/network/ssh:default restore /etc/ssh/sshd\_config.default
Restarting the sshd Service
To restart the sshd service, use the following command:
# svcadm restart svc:/network/ssh:default
Preventing the ftp/usr/lib/ssh/sftp-server Subsystem
To prevent the ftp/usr/lib/ssh/sftp-server subsystem from running, follow these steps:
- Open the sshd\_config file:
# vi /etc/ssh/sshd\_config
- Add the following line:
Subsystem sftp /bin/true
- Save and close the file.
This configuration change will cause the sftp-server to be replaced by the /bin/true command, effectively preventing the subsystem from running.
This article provided a detailed explanation of how to reset, restart the sshd service, and prevent the ftp/usr/lib/ssh/sftp-server subsystem from running in Solaris. By following the steps outlined in this article, you can ensure the secure and efficient operation of your Solaris system.
References
- Oracle Solaris 11.4 Administration: Secure Shell (SSH) https://docs.oracle.com/cd/E53394_01/html/E54802/gkhzy.html
- Oracle Solaris 11.4 Administration: Configuring SSH https://docs.oracle.com/cd/E53394_01/html/E54802/gkhze.html