Technology Encyclopedia Home >How to set up SSH remote access on Pop!_OS?

How to set up SSH remote access on Pop!_OS?

To set up SSH remote access on Pop!_OS, follow these steps:

  1. Install OpenSSH Server: If it's not already installed, you can do so by opening a terminal and running:

    sudo apt update
    sudo apt install openssh-server
    
  2. Verify SSH Service: Ensure that the SSH service is running and enabled to start on boot:

    sudo systemctl status ssh
    sudo systemctl enable ssh
    sudo systemctl start ssh
    
  3. Configure Firewall: Allow SSH traffic through the firewall if it's active. For UFW (Uncomplicated Firewall), use:

    sudo ufw allow ssh
    sudo ufw enable
    
  4. Get Your IP Address: Find out your Pop!_OS machine's IP address, which you'll need to connect from another device:

    ip addr show
    

    Look for an entry like inet under your network interface (e.g., eth0 or wlan0).

  5. Connect via SSH: From another computer, open a terminal and use the SSH command to connect:

    ssh username@ip_address
    

    Replace username with your actual username on the Pop!_OS machine and ip_address with the IP address you found.

  6. Secure Your SSH (Optional but Recommended): For enhanced security, consider editing the SSH configuration file (/etc/ssh/sshd_config) to disable root login and use key-based authentication instead of passwords.

Example of a secure SSH setup:

  • Edit the SSH configuration file:
    sudo nano /etc/ssh/sshd_config
    
  • Change or add the following lines:
    PermitRootLogin no
    PasswordAuthentication no
    PubkeyAuthentication yes
    
  • Restart the SSH service to apply changes:
    sudo systemctl restart ssh
    

For managing SSH keys and further securing your cloud-based Pop!_OS instance, consider using services like Tencent Cloud's CloudHSM (Hardware Security Module) for key management and encryption needs.