Add username flag for machine ssh

allow users to specify what username to use when ssh-ing into the vm.
If the username flag is set, the username will be the flag value. If the
flag is not set and the the vm name is specified, the default user of
the vm will be used. if the flag is not set, and the vm name is not
specified, then the username of the default connection will be used.

Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
Ashley Cui
2021-09-16 15:17:02 -04:00
parent 9119a578e7
commit e3e9e5175f
2 changed files with 18 additions and 17 deletions

View File

@ -4,7 +4,7 @@
podman\-machine\-ssh - SSH into a virtual machine
## SYNOPSIS
**podman machine ssh** [*name*] [*command* [*arg* ...]]
**podman machine ssh** [*options*] [*name*] [*command* [*arg* ...]]
## DESCRIPTION
@ -21,6 +21,10 @@ with the virtual machine is established.
Print usage statement.
#### **--username**=*name*
Username to use when SSH-ing into the VM.
## EXAMPLES
To get an interactive session with the default virtual machine: