Technology Encyclopedia Home >How to configure remote access on Solaris?

How to configure remote access on Solaris?

Configuring remote access on Solaris typically involves setting up SSH (Secure Shell) to allow secure connections to the system. Here’s a step-by-step guide:

Step 1: Install OpenSSH Server

If it's not already installed, you can install OpenSSH server using the following command:

pkg install openssh-server

Step 2: Start and Enable SSH Service

Start the SSH service and enable it to start automatically on boot:

svcadm enable ssh
svcadm start ssh

Step 3: Configure SSH Access

Edit the SSH configuration file to set up remote access permissions and other settings:

vi /etc/ssh/sshd_config
  • PermitRootLogin: Set to no for security reasons unless you have a specific need.
  • PasswordAuthentication: Set to yes if you want to allow password-based authentication (consider using key-based authentication for better security).
  • PubkeyAuthentication: Set to yes to allow SSH keys for authentication.

Step 4: Restart SSH Service

After making changes to the configuration file, restart the SSH service:

svcadm restart ssh

Step 5: Generate SSH Keys (Optional but Recommended)

For enhanced security, generate an SSH key pair on your local machine and copy the public key to the Solaris server:

ssh-keygen -t rsa
ssh-copy-id user@solaris_server_ip

Example Usage

Once configured, you can remotely access the Solaris server using:

ssh user@solaris_server_ip

Security Considerations

  • Always use strong passwords or, preferably, SSH keys for authentication.
  • Limit the IP addresses that can connect via SSH by configuring firewall rules.

Cloud-Related Recommendation

If you are managing Solaris systems in a cloud environment, consider using Tencent Cloud’s Virtual Private Cloud (VPC) service to create a secure network environment. You can also leverage Tencent Cloud’s Cloud Shell for secure SSH access to your cloud instances without needing to set up your own SSH server.

By following these steps, you can securely configure remote access to your Solaris system.