[kwlug-disc] SSH to a VM
CrankyOldBugger
crankyoldbugger at gmail.com
Thu Feb 12 14:44:52 EST 2015
Well I'm making some progress now. Chased a bunch of red herrings before I
found a solution but it was worth it. If you're interested, there's a
decent guide at http://wiki.libvirt.org/page/Networking , although much of
what I ended up doing was cobbled together from various sources.
First off, to do a sort of cleaning I got rid of the existing VIRBR0 (with
the troublesome 192.168.122.x address) on the host machine using:
# virsh net-destroy default
# virsh net-undefine default
# service libvirtd restart
Then I created a new VIRBR1 with an address in the right subnet (10.x.x.x) .
Next, I deleted the VM that never worked right and started over. Creating
a new VM (Ubuntu 14.04 Desktop) using Virtual Machine Manager has gotten
ridiculously easy. Similar to vShDuring the new VM creation process, if
you go to Advanced settings you can specify VIRBR1 as the bridge. Sorry,
but I don't recall if I specified the second NIC card anywhere. I will
check next time.
If I must have something to complain about, it's that VMM could give us a
bit more granular control over how the VM is configured, but the system
works as is.
Once the new VM was created, it took a minute to find the internet but as
soon as it did the Software Update ran out and found updates to install. I
could browse the internet right away.
>From there it was just a matter of setting the machine up on DynDNS.com,
installing OpenSSH, VNC server, etc., setting up Port Forwarding on the
router, etc.
So at this point, I can SSH to the VM from a remote location. This is a
good milestone.
However, VNC is still giving me some grief. If I try to log in remotely
using TightVNC (from a Windows client), I get the error "Error in TightVNC
Viewer: No security types supported. Server sent security types, but we do
not support any of their". This is strange as the same TightVNC
configuration works on other Ubuntu boxes at home. In fact, I did much of
the above goofiness over a TightVNC connection to an existing Ubuntu
desktop with similar configuration. Most of the results I found in Google
say to disable encryption but that's not in my plans. If I get past this
issue I'll let you know.
On Fri Feb 06 2015 at 3:17:25 PM Nick Guenther <nguenthe at uwaterloo.ca>
wrote:
> Tell us if it turns out you need to turn on IP routing! If your box is
> handling two interfaces already and the VM interface is just appearing as a
> third, you might not need that afterall. Good luck.
>
> On February 6, 2015 3:08:05 PM EST, CrankyOldBugger <
> crankyoldbugger at gmail.com> wrote:
>
>> Well I was puzzled by why virbr0 picked 192.x.x.x when there were two
>> NICs on that box box on 10.x.x.x. I assumed that there was some deep
>> reason behind that which was beyond my understanding.. I could try changing
>> virbr0 tonight and see what happens.
>>
>> On Fri Feb 06 2015 at 3:05:17 PM Nick Guenther <nguenthe at uwaterloo.ca>
>> wrote:
>>
> Also to diagnose the last problem--which is not IP related-- run ssh -vv.
>>> It sounds like you're offering a pubkey and it's rejecting it, and this
>>> will show you which. I believe openssh by default falls back to asking for
>>> passwords in this case, but maybe your client config or the VM config is
>>> denying that.
>>>
>>> On February 6, 2015 2:51:19 PM EST, CrankyOl! dBugger <
>>> crankyoldbugger at gmail.com> wrote:
>>>
>>>> I finally returned to the idea of building some VMs on my home network
>>>> on an Ubuntu server. I found uvt-kvm to be a stupid-easy way to actually
>>>> make the VMs (in this case, a straightforward Ubuntu 14.04 Desktop install).
>>>>
>>>> The VM is running fine when I view it in Virtual Machine Manager from a
>>>> separate desktop client (connect to the host, then open the VM from the
>>>> list). I've set up port forwarding on my router, installed SSH on the VM,
>>>> made sure it's running, installed a ddclient and set up the machine name on
>>>> dyn.com, generally everything I've done on other physical Ubuntu
>>>> machines.
>>>>
>>>> However, when I try to connect remotely via SSH, I get "Error in
>>>> TightVNC Viewer: A connection attempt failed because the connected party
>>>> did not properly respond after a period of time, or established connection
>>>> failed because connected host has failed to respond."
>>>>
>>>> I get this error when I'm outside my network. From within the network,
>>>> I get "no route to host" if I use "ssh jeff at 192.168.122.15".
>>>>
>>>> Note that my network runs on the 10.x.x.x subnet. The 192.168.122.x
>>>> came from virbr0 on the physical host box.
>>>>
>>>> If I try to ssh from the physical host to the VM, I get "Permission
>>>> denied (publickey)" before it even asks me to login.
>>>>
>>>> So I seem to be missing a hop somewhere from my router to the virtual
>>>> machine. Does anyone have any ideas on how to make the connection?
>>>>
>>>> ------------------------------
>>>>
>>>> kwlug-disc mailing list
>>>> kwlug-disc at kwlug.org
>>>> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>>>>
>>>>
>>> --
>>> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20150212/2cae8012/attachment.htm>
More information about the kwlug-disc
mailing list