podman-machine-ssh(1)

πŸ“¦
version 6.1.4 Β· 5 versions
, in arch rolling, fedora 43, fedora 44, ubuntu resolute

πŸ’– podman-machine-ssh(1) β€” bestie edition πŸ’–

okay so we're doing the podman-machine-ssh page from the General Commands Manual and honestly? it's giving "let me just pop into my VM real quick" energy ✨


🌸 NAME 🌸

podman-machine-ssh β€” SSH into a virtual machine πŸ–₯️✨


πŸ¦‹ SYNOPSIS πŸ¦‹

podman machine ssh [options] [name] [command [arg ...]]

πŸ’… DESCRIPTION πŸ’…

So here's the tea, bestie: podman machine ssh SSHes you into a Podman-managed virtual machine, and if you want, it'll also run a command for you while it's in there. no cap 🫢

Unless you're using the default virtual machine, the first argument has to be the virtual machine name. After that name, the optional command you wanna execute can follow. And if you don't hand it a command at all? You get a whole interactive session with the VM, main character style πŸ‘‘

The exit code from the ssh command gets forwarded right back to the podman machine ssh caller β€” check Exit Codes ⟨#Exit-Codes⟩ for the deets.

The default machine name is podman-machine-default. So if you don't specify a machine name as an argument, then podman-machine-default is what you'll be SSH'd into. it's literally the default, that's the whole vibe πŸ’«

Rootless only. that's it, that's the note. πŸ“

✨ OPTIONS ✨

  • --help β€” prints the usage statement. classic. iconic. we love a helper πŸŽ€
  • --username=name β€” the username to use when SSH-ing into the VM πŸ™ˆ

πŸ”₯ Exit Codes πŸ”₯

The exit code from podman machine ssh tells you why the command failed β€” like a little vibe check for your errors. When podman machine ssh commands exit with a non-zero code, the exit codes follow the chroot standard, see below:

125 β€” the error is with podman itself πŸ’€

$ podman machine ssh --foo; echo $?
Error: unknown flag: --foo
125

126 β€” executing a contained command and the command cannot be invoked 😭

$ podman machine ssh /etc; echo $?
Error: fork/exec /etc: permission denied
126

127 β€” executing a contained command and the command cannot be found πŸ•΅οΈ

$ podman machine ssh foo; echo $?
Error: fork/exec /usr/bin/bogus: no such file or directory
127

Exit code contained command exit code β€” whatever the command inside felt like returning, you get it back fr fr 🌈

$ podman machine ssh /bin/sh -c 'exit 3'; echo $?
3

🌟 EXAMPLES 🌟

To get an interactive session with the default Podman machine:

SSH into the default Podman machine.

$ podman machine ssh

Run command inside the default Podman machine via ssh.

$ podman machine ssh myvm

Run command inside the specified Podman machine via ssh.

$ podman machine ssh myvm rpm -q podman

πŸ‘‘ SEE ALSO πŸ‘‘

podman(1), podman-machine(1)


πŸ’œ HISTORY πŸ’œ

March 2021, Originally compiled by Ashley Cui acui@redhat.com ⟨mailto:acui@redhat.com⟩


and that's the whole page, bestie!! mwah πŸ’‹ this was podman-machine-ssh(1) from the General Commands Manual β€” go forth and SSH into ur VM like the icon u are πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from