How to Securely Record SSH Sessions on RHEL in a Private VPC Network

7:09 pm
September 15, 2023

In this article, we will discuss how to securely record SSH sessions on a Red Hat Enterprise Linux (RHEL) Virtual Server Instance (VSI) in a private Virtual Private Cloud (VPC) network. We will also cover the installation of RHEL packages using Ansible automation and setting up a highly available bastion host.

What is session recording and why is it required?

Session recording is the process of capturing and storing SSH sessions for auditing and compliance purposes. It allows administrators to review user sessions in the event of a security breach or to ensure compliance with regulatory requirements.

What is a private VPC network?

A private VPC network is a virtual private cloud that operates without any public ingress or egress network traffic. It does not have any public gateways on the subnets or floating IPs on the Virtual Server Instances (VSIs).

How do I connect to the private VPC network?

You can connect to the private VPC network using the client-to-site VPN option available on IBM Cloud. This VPN option allows users to connect to IBM Cloud resources through secure, encrypted connections. The client-to-site VPN is highly available with two VPN servers created in different availability zones.

Prerequisites

Before setting up SSH session recording, you need to provision the private VPC network using Terraform and have the necessary access credentials and certificates.

Provisioning the private VPC network using Terraform

To provision the private VPC network, follow these steps:

  1. Set the Terraform variables for IBM Cloud API key and Secrets Manager certificate CRN.
  2. Clone the GitHub repository for the private VPC network.
  3. Run the Terraform commands to provision the VPC resources.

Connect to client-to-site VPN

After the VPC resources are provisioned, you need to download the VPN client profile and connect to the client-to-site VPN using the OpenVPN Client.

Verify the SSH connection

To verify the SSH connection, add the SSH private key to the SSH agent and use the SSH command to connect to the RHEL VSI through the bastion host.

Deploy session recording using Ansible

To deploy the session recording solution, you need to install the necessary packages (tlog, SSSD, cockpit-session-recording) on the RHEL VSI using Ansible automation. Run the Ansible playbook to install the packages.

Check the session recordings, logs and reports

To check the session recordings, logs, and reports, access the web console using the machine name or private IP over port 9090. Navigate to the Session Recording section to view the list of session recordings and other information.

Conclusion

SSH session recording is crucial for auditing and compliance in bastion hosts. In this article, we discussed how to securely record SSH sessions on RHEL in a private VPC network using in-built packages and Ansible automation. We also covered the provisioning of the private VPC network using Terraform and the setup of a highly available bastion host.

Recommended Reading

For more information on IBM Cloud VPC and related topics, refer to the following resources:

FAQs

What is a bastion host?

A bastion host is a security mechanism used in network and server environments to control and enhance security when connecting to remote systems. It acts as an intermediary between public traffic and the private network, passing SSH requests to downstream machines. However, bastion hosts are vulnerable to intrusion because they are exposed to public traffic.

Why is session recording important?

Session recording is important for auditing and compliance purposes. It allows administrators to audit user SSH sessions and ensure they comply with regulatory requirements. In the event of a security breach, session recording helps analyze user sessions for investigation and remediation.

How can I access the session recordings and other information?

To access the session recordings, logs, diagnostic reports, and other information, you can use the web console. The web console can be accessed using the machine name or private IP over port 9090. You will need the root password to log in.


Share:

More in this category ...

1:22 pm October 4, 2023

Polygon Price Surges as Shiba Memu Presale Exceeds $3.55 Million

12:12 pm October 4, 2023

Ripple’s Legal Wins in Singapore and US Boost XRP Price

11:57 am October 4, 2023

Understanding the Advantages of Public Key Infrastructure in Authentication and Encryption

7:57 am October 4, 2023

Understanding the Role of Data Integrity in Business Decision Making

7:34 am October 4, 2023

Ripple Receives Full Approval for Singapore Payments License

Featured image for “Ripple Receives Full Approval for Singapore Payments License”
3:55 am October 4, 2023

Cryptography Algorithms: A Deep Dive into Symmetric and Asymmetric Systems

3:43 am October 4, 2023

Enhancing Cybersecurity with AI and Automation: Safeguarding Retailers and Consumer Goods Businesses from Data Breaches

11:52 pm October 3, 2023

Trustless Transactions: Empowering Individuals in the Digital Age

9:35 pm October 3, 2023

425 Billion Shiba Inu (SHIB) Tokens Worth $3.2 Million Moved to Coinbase

Featured image for “425 Billion Shiba Inu (SHIB) Tokens Worth $3.2 Million Moved to Coinbase”
7:51 pm October 3, 2023

Unveiling the Secrets of Transparency: A Guide for Businesses

7:26 pm October 3, 2023

Automate Operations for Faster Incident Resolution and Cost Efficiency

6:29 pm October 3, 2023

Binance Announces End of BUSD Lending Services by October 25

3:49 pm October 3, 2023

From Traditional Banking to Digital Assets: How Blockchain is Revolutionizing Finance

11:48 am October 3, 2023

Securing Peer-to-Peer Networks: The Power of Encryption and Trust

11:36 am October 3, 2023

Celebrities Sound the Alarm on AI Deep Fake Scams

Featured image for “Celebrities Sound the Alarm on AI Deep Fake Scams”
11:10 am October 3, 2023

Audi’s Integrated Approach with IBM Planning Analytics for Building Cars in a Changing World

7:47 am October 3, 2023

Immutable Ledgers vs. Traditional Databases: Unleashing the Potential

3:47 am October 3, 2023

Consensus Mechanisms: The Backbone of Distributed Ledger Technology

2:52 am October 3, 2023

Ovum Health Partners with IBM Watson Assistant to Provide Fertility Patients with Chat and Scheduling Tools

1:36 am October 3, 2023

Sphere Entertainment (SPHR) Stock Soars as Sphere Venue Opens with U2 Concert

Featured image for “Sphere Entertainment (SPHR) Stock Soars as Sphere Venue Opens with U2 Concert”
11:44 pm October 2, 2023

Decentralization vs. Centralization: Balancing Power and Efficiency

10:22 pm October 2, 2023

Bitfarms Reports 7.3% Increase in Monthly Bitcoin Mining Output

7:43 pm October 2, 2023

Understanding the Benefits and Limitations of Smart Contracts

6:32 pm October 2, 2023

The U.S. Chamber of Commerce Foundation and IBM Collaborate to Explore AI’s Role in Skills-Based Hiring

5:32 pm October 2, 2023

Grayscale Files Request to Convert Ethereum Trust into Ethereum ETF

3:40 pm October 2, 2023

A Beginner’s Guide to Cryptocurrency Wallets: Keeping Your Digital Assets Safe

3:30 pm October 2, 2023

Sam Bankman-Fried Faces Trial: What You Need to Know

Featured image for “Sam Bankman-Fried Faces Trial: What You Need to Know”
1:59 pm October 2, 2023

FTX Auditor Prager Metis Faces SEC Legal Action for Violating Independence Rules

12:50 pm October 2, 2023

Top 7 DeFi Crypto Tokens with Potential for 10x Returns

11:35 am October 2, 2023

Blockchain and Cryptocurrency: Exploring the Future of Digital Finance