BCVK-EPHEMERAL-SSH(8)
π bcvk-ephemeral-ssh(8) π
okay bestie, welcome to bcvk-ephemeral-ssh β the section 8 manual page that teaches you how to slide into a running VM's DMs via SSH β¨
β¨ NAME β¨
bcvk-ephemeral-ssh β Connect to running VMs via SSH π¦
πΈ SYNOPSIS πΈ
bcvk ephemeral ssh CONTAINER_NAME [SSH_ARGS]
π DESCRIPTION π
So basically, this command connects you to a running ephemeral VM via SSH. It's giving β¨main character energyβ¨ because it does all the annoying detective work for you: it goes and finds the VM's SSH port, and then it connects using the SSH key that was injected when the VM got started with -K or --ssh-keygen. No cap.
π Prerequisites π
The target VM has to have been started with SSH key injection, fr fr:
bcvk ephemeral run -d --rm -K --name myvm image
Without -K, the VM will not have SSH keys configured and this command will fail to authenticate. It's giving locked out of your own house π no key, no entry.
π₯ How It Works π₯
- Queries the podman container to find the VM's SSH port
- Retrieves the SSH private key from the container
- Connects using the dynamically assigned port and key
- Passes any additional arguments to the
sshclient
likeβ¦ it's literally just doing the four steps you would have done manually, but cute and automatic π
π¦ VM Lifecycle π¦
SSH connections do not affect the VM lifecycle for background VMs, okay? Important:
- Background VMs (started with
-d) β Continue running after SSH disconnect. You can reconnect as many times as needed. Obsessed with the loyalty π - Auto-cleanup VMs (started with
--rm) β Container is removed when the VM stops, but SSH disconnect alone does not stop the VM.
To stop a background VM, use podman stop.
For automatic cleanup on SSH exit, use bcvk-ephemeral-run-ssh(8) instead.
β OPTIONS β
CONTAINER_NAMEβ Name or ID of the container running the target VM. This argument is required. (Yes bestie, you have to tell it which VM. It can't read your mind, sadly π)ARGSβ SSH arguments like-v,-L,-o
π EXAMPLES π
π Basic Connection
Connect to a running VM:
bcvk ephemeral ssh myvm
π§ Running Remote Commands
Execute a command directly:
bcvk ephemeral ssh myvm 'systemctl status'
Check disk usage:
bcvk ephemeral ssh myvm 'df -h'
View journal logs:
bcvk ephemeral ssh myvm 'journalctl -f'
π SSH Options
Enable verbose output for debugging connection issues:
bcvk ephemeral ssh myvm -v
Forward a local port to the VM:
bcvk ephemeral ssh myvm -L 8080:localhost:80
# Access VM's port 80 at localhost:8080
Reverse port forwarding (expose host port to VM):
bcvk ephemeral ssh myvm -R 3000:localhost:3000
π Typical Workflow
# Start a VM in the background
bcvk ephemeral run -d --rm -K --name testvm quay.io/fedora/fedora-bootc:42
# Connect and do some work
bcvk ephemeral ssh testvm
# ... interactive session ...
# exit
# Reconnect later
bcvk ephemeral ssh testvm
# Run a quick command without interactive session
bcvk ephemeral ssh testvm 'cat /etc/os-release'
# Stop the VM when done
podman stop testvm
π«Ά File Transfer
Use scp-style operations by getting the SSH details:
# For now, use podman exec for file transfer
podman cp localfile testvm:/path/in/container
# Or mount a shared directory when starting the VM
bcvk ephemeral run -d --rm -K --bind /host/path:shared --name vm image
π TROUBLESHOOTING π
- Connection refused β The VM may still be booting. Wait a few seconds and retry. She's just not ready yet, give her a minute π«Ά
- Permission denied β Ensure the VM was started with
-Kfor SSH key injection. No-K, no key, no vibe check passing. - Host key verification failed β Each VM gets a unique host key. Use
-o StrictHostKeyChecking=noif needed. (Yes it's a little unhinged, that's the point.)
π SEE ALSO π
bcvk(8), bcvk-ephemeral(8), bcvk-ephemeral-run(8), bcvk-ephemeral-run-ssh(8), ssh(1)
π VERSION π
v0.21.0
okay that's the whole page bestie, go forth and SSH into your little ephemeral VM, you absolute icon π
β¨ periodt. this was bcvk-ephemeral-ssh(8), version v0.21.0 β ily, bye π¦π
π¦ where this page comes from
- fedora 43: bcvk 0.21.0-1.fc43 Β· Apache-2.0 OR MIT
- fedora 44: bcvk 0.21.0-1.fc44 Β· Apache-2.0 OR MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms