SSH (Secure Shell) is a cryptographic network protocol that allows secure communication between two systems over an insecure network. It provides a way to establish a secure and encrypted connection between a client and a server, allowing the client to securely access and manage the server remotely.

SSH was designed to replace older, less secure remote access protocols such as Telnet and FTP. It uses public key cryptography to authenticate the client and server, and then encrypts all data sent between them to prevent eavesdropping, tampering, and forgery.

SSH is commonly used for remote system administration, file transfers, and tunneling other protocols over a secure channel. It is available on most modern operating systems and is widely used by system administrators and developers for secure access to remote systems.

Configuration

To set up SSH in Oracle Linux, you need to follow these steps:

  1. Install SSH Server: You can install the SSH server package on Oracle Linux using the following command:

     sudo yum install openssh-server
    
  2. Configure SSH Server: The SSH server configuration file is located at /etc/ssh/sshd_config. You can modify this file to customize the server settings. For example, you can change the default port number, enable or disable password authentication, and restrict SSH access to specific users or groups.

  3. Start SSH Service: After installing and configuring the SSH server, you need to start the SSH service using the following command:

     sudo systemctl start sshd
    
  4. Enable SSH Service: To ensure that the SSH server starts automatically at system startup, you need to enable the SSH service using the following command:

     sudo systemctl enable sshd
    
  5. Verify SSH Connection: Finally, you can verify that the SSH server is working by connecting to it from another system using an SSH client such as PuTTY or OpenSSH. You can use the IP address or hostname of the Oracle Linux system and the default SSH port number (22) to establish the connection.

Once the connection is established, you can log in to the Oracle Linux system using your username and password. By default, the SSH server will use the system’s PAM (Pluggable Authentication Modules) configuration to authenticate users, so you can use the same username and password as you would when logging in locally.

STIG Compliance

To make an SSH server compliant with the Security Technical Implementation Guide (STIG), you need to follow these steps:

  1. Disable SSHv1: SSHv1 is considered insecure and should not be used. To disable SSHv1, you need to edit the SSH server configuration file /etc/ssh/sshd_config and add the following line:

     Protocol 2
    
  2. Configure SSH Authentication: The SSH server should use strong authentication mechanisms such as public key authentication or two-factor authentication (2FA). You can configure these options in the SSH server configuration file. For example, you can add the following lines to require public key authentication and disable password authentication:

     PasswordAuthentication no
     PubkeyAuthentication yes
    
  3. Configure SSH Encryption: The SSH server should use strong encryption algorithms for data transmission. You can configure these options in the SSH server configuration file. For example, you can add the following lines to use only strong encryption algorithms:

     Ciphers aes256-ctr,aes192-ctr,aes128-ctr
     MACs hmac-sha2-512,hmac-sha2-256
    
  4. Set SSH Idle Timeout: To prevent unauthorized access to an SSH session, you should configure an idle timeout for SSH sessions. You can add the following line to the SSH server configuration file to set an idle timeout of 15 minutes:

     ClientAliveInterval 900
    
  5. Restart SSH Service: After making these changes, you need to restart the SSH service using the following command:

     sudo systemctl restart sshd
    

By implementing these changes, you can make your SSH server compliant with the STIG guidelines. However, keep in mind that there may be additional STIG requirements for your specific system configuration, and you should always consult the official STIG documentation for the most up-to-date guidance.