Podman Remote Client Setup
`podman system connection add` succeeds without testing anything, then the first real command fails with an ssh handshake error. Authorise the key and `podman --remote run` starts a container on the other machine while the local `podman ps` stays empty.
Registries and Remote Hosts Guide 38 of 47 Intermediate
- OSUbuntu 26.04 LTS (resolute)
- Podman5.7.0
- Runtimecrun 1.21
- Networknetavark 1.16.1
- TimeAbout 14 min
- Reviewed22 August 2026
Written against the versions above. Podman follows the distribution here rather than a vendor repository, so the version you get is the one Ubuntu shipped. The commands are stable across 5.x.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| PODMAN01 | 192.168.0.21 | Ubuntu 26.04 LTS | Primary Container Host | 2 Core | 4 GB | 50 GB |
| PODMAN02 | 192.168.0.22 | Ubuntu 26.04 LTS | Rootless and Remote Client Host | 2 Core | 4 GB | 50 GB |
Before you start
- guide 70 - the remote host needs
podman.socketenabled, and that guide is where it gets enabled. - Two hosts. podman02 is the client and never runs a container of its own.
-
A client with nothing configured
On podman02,
podman system connection lsis empty andpodman psshows the local engine's containers - none.The remote client is not a separate program. It is the same
podmanbinary with--remote, or with a default connection configured, talking to the API socket from guide 70 over ssh. Nothing needs installing beyond Podman itself.It needs an ssh key, so create one if the client has none. This is the part worth pausing on: the transport is ssh, so everything you know about ssh authentication applies, and none of it is Podman's problem to solve.
bash Example session podman system connection lsName URI Identity Default ReadWritepodman psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMEStest -f ~/.ssh/id_ed25519 || ssh-keygen -t ed25519 -N '' -f ~/.ssh/id_ed25519Generating public/private ed25519 key pair.Your identification has been saved in /home/sysadmin/.ssh/id_ed25519Your public key has been saved in /home/sysadmin/.ssh/id_ed25519.pubThe key fingerprint is:SHA256:RO+bjvsSckWSgkgs+oVKv3wH8oQ6b5emUnjVJnS0G+0 sysadmin@podman02The key's randomart image is:+--[ED25519 256]--+| o.. ..... ||. o ...o=.. ||.. .. o+.+. ||... .o ++.. ||.oo.o o.SE. ||...* o. o o || = = oo .o || + + * ..o || =o= . o+o |+----[SHA256]-----+Expected resultNo connections, no containers, and a key present on the client.
Success conditionThe client has an ssh key and no connections yet.
-
Adding a connection proves nothing
podman system connection add --identity ~/.ssh/id_ed25519 lab01 \ ssh://sysadmin@192.168.0.21/run/user/1000/podman/podman.sockIt succeeds silently, and
connection lslists it as default and read-write. Everything looks configured.Then the first real command fails:
Error: unable to connect to Podman socket: failed to connect: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remainconnection adddoes not test the connection. It writes a configuration entry, and any error waits until you use it. Worth knowing so you test immediately withpodman --remote inforather than discovering it inside a deploy.There is also a distracting
provider: qemuline above the error. That is Podman's machine subsystem being mentioned because it assumes an unreachable socket might be apodman machineVM. On Linux it is noise - ignore it and read the ssh error.The missing step is ordinary ssh: append the client's public key to
~/.ssh/authorized_keyson the server. Podman does not do it for you and cannot.bash Example session podman system connection add --identity ~/.ssh/id_ed25519 lab01 ssh://sysadmin@192.168.0.21/run/user/1000/podman/podman.sockpodman system connection lsName URI Identity Default ReadWritepodman --remote info --format 'host={{.Host.Hostname}} rootless={{.Host.Security.Rootless}}'OS: linux/amd64buildOrigin: Ubuntuprovider: qemuversion: 5.7.0 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VMError: unable to connect to Podman socket: failed to connect: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain: ssh://sysadmin@192.168.0.21:22/run/user/1000/podman/podman.sock[exit 125]Expected resultA listed connection, then an ssh authentication failure on first use.
Success conditionYou know the difference between a configured connection and a working one.
-
With the key authorised
podman --remote infonow answers withhost=podman01- the client is reporting the server's hostname, androotless=truebecause it is talking to podman01's rootless socket as podman01's user.Then the demonstration worth doing:
podman02 $ podman --remote run -d --name from-afar -p 8094:80 nginx:alpine podman02 $ podman --remote ps -> from-afar Up podman02 $ podman ps -> (empty) podman01 $ podman ps -> from-afar Up podman01 $ curl localhost:8094 -> http=200The container is entirely on podman01. podman02's own engine has nothing, and the published port is on podman01 - so
curlworks there and would not on the client.That is the mental model:
--remoteis a client, not a tunnel. The image is pulled by the server from the server's network, the container runs in the server's namespaces, volumes resolve on the server's disk. A-v ~/src:/srcmeans the server's~/src, which is the single most common surprise here.Drop the
--remoteby making a connection default -podman system connection default lab01- and plainpodmancommands go remote. Convenient, and worth thinking twice about: yourpodman rm -afnow runs somewhere else.bash Example session podman --remote info --format 'host={{.Host.Hostname}} rootless={{.Host.Security.Rootless}}'host=podman01 rootless=truepodman --remote run -d --name from-afar -p 8094:80 docker.io/library/nginx:alpinecb39211e1a35dee93f31465b39b35e331283d27983d2594856cad6657f5ce5b0podman --remote ps --format 'table {{.Names}} {{.Status}}'NAMES STATUSfrom-afar Up 1 secondpodman ps --format 'table {{.Names}} {{.Status}}'NAMES STATUScurl -s -o /dev/null -w 'http=%{http_code}\n' http://localhost:8094http=200podman --remote rm -f from-afarfrom-afarExpected result
host=podman01, a container visible remotely and on the server but not locally, andhttp=200from the server.Success conditionYou started a container on another machine and know where its files would live.
Troubleshooting
ssh: handshake failed: unable to authenticate.Why: The client's public key is not in the server user's
authorized_keys.Fix:
ssh-copy-id sysadmin@<server>, or append the key by hand. Test with plainsshbefore blaming Podman.failed to connect: dial unix ...: connect: no such file or directory.Why: ssh works but the socket path is wrong or the socket is not enabled on the server.
Fix:On the server,
podman info --format '{{.Host.RemoteSocket.Path}}'gives the exact path. Rootful is/run/podman/podman.sock.It works interactively and fails from cron.
Why: The server's user socket needs a running user manager.
Fix:
sudo loginctl enable-lingeron the SERVER - see guide 41.A bind mount is empty or wrong over a remote connection.
Why: Paths resolve on the server, not on your machine.
Fix:Copy the data across first, or use a named volume. There is no automatic forwarding of local paths.