Do I need to configure GRUB and make other alterations, or might there be some equivalent to virt-viewer which is strictly CLI?

My thinking is that "whatever" virt-viewer is doing, through whatever "magic" it achieves that, should, conceivably, be available through the CLI without invoking the GUI.

All it seems to be doing is running a sort of GUI version of a console, or virtual console, of some variety. When I google how to get a bash type prompt from with virsh there's mention of configuring bridge networking, or different, for me, fairly involved procedures.

For my purposes, virt-viewer fits the bill -- except that it seemingly requires, or utilizes, the GUI. For a strictly CLI it gets more involved?

This is in the context of using SSH to remotely login to the host which is why GUI options, such as how virtviewer` seems to work, wouldn't fit.

something perhaps like:

"It can be used remotely (from a third machine, typically your workstation) if the host does not have graphical display."

but how?

Basically want to chain virt-viewer with ssh to remotely login to AWS host in order to then use virt-viewer remotely. If that makes sense.

2 Answers 2


virt-viewer is a GUI tool, full stop. It requires a graphical desktop to function.

If you want to access a guest while logged in to the host machine directly, you'll need to connect via a console port.

Alternatively, you can run virt-viewer or virt-manager on your local machine and connect remotely via SSH (as in your provided answer). This is best done with key-based authentication as SSH password-auth may result in numerous login prompts from virt-viewer (one for each channel, of which there are several for any given connection [usb/display/cursor/inputs/etc.]).

Note that you do not need to install virt-viewer or virt-manager on the host machine, as these tools communicate directly with libvirt.


virt-viewer --connect qemu+ssh://root@kvm.home.barfoo.org:222/system guest

Don't forget to let your ssh key on the host, otherwise you could have password issues.

credits to answer:

  • 1
    You put up an untested answer to your own question? Nov 17, 2017 at 5:25
  • Your answer would deserve an up, if you would test and elaborate it.
    – peterh
    Nov 17, 2017 at 5:27
  • kvm-ok fails on AWS, so no way to test this at the moment. unix.stackexchange.com/q/405404/17056
    – Thufir
    Nov 18, 2017 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.