ssh-into-vm

Yes, you can SSH into your Ubuntu VM from the Pop!_OS host! Here's how to set it up:

Step 1: Install SSH Server in VM

# In your Ubuntu VM
sudo apt update
sudo apt install openssh-server

# Start and enable SSH service
sudo systemctl enable ssh
sudo systemctl start ssh

# Verify it's running
sudo systemctl status ssh

Step 2: Find the VM's IP Address

# In the Ubuntu VM, get the IP address
ip addr show

# Or use this simpler command
hostname -I

Look for an IP address like 192.168.122.xxx (common for libvirt/GNOME Boxes VMs).

Step 3: SSH from Host

# From your Pop!_OS host
ssh username@vm-ip-address

# Example:
ssh john@192.168.122.45

Alternative: Use VM Name (if mDNS works)

# Try using the VM's hostname
ssh username@ubuntu-vm-name.local

Useful SSH Tips

Set up Key-based Authentication

# From host, copy your public key to VM
ssh-copy-id username@vm-ip-address

# Now you can SSH without password
ssh username@vm-ip-address

Create SSH Alias

Add to ~/.ssh/config on host:

Host myvm
    HostName 192.168.122.45
    User john
    Port 22

Then just use: ssh myvm

Firewall Considerations

Ubuntu's firewall (ufw) is usually inactive by default, but if you have issues:

# In VM, allow SSH
sudo ufw allow ssh
sudo ufw enable

Benefits of SSH Access

  • File transfer with scp or rsync
  • Remote terminal access
  • Port forwarding
  • Running commands without opening VM window
  • Better for development workflows

This gives you much more flexible access to your VM than just the GNOME Boxes console!


Backlinks