Super bob's picture


I have a turnkey mindtouch vm and ssh is behaiving very oddly.

If it try to connect via ssh it always connects to local host.

Ie if i type:

ssh myuser@myhost 


ssh myuser@myhost.domain.lan

it always connects to the local machine rather then myhost.

it can resolve myhost correctly. FQDN has not effect either.

SSH is fully working on myhost I can connect from putty just fine.

If I have a user on the vm called myuser then I will end up getting a connection but it will take me to the console on the local machine.

Ah i should point out the machine I'm trying to ssh to from the vm is the host machine. I've seen issues the other way round - ie ssh from the host to the guest but this works fine. So I'm unsure what's going on or how to resolve it.

Jeremy Davis's picture

You are trying to SSH from your guest VM (running TKL) to your host machine, is that right?

What OS is your host running? Does it have an SSH server of some sort installed? Does it have a firewall? If so is it configured to allow incoming SHH connections? Can it connect using IP address?

Super bob's picture

Thats correct, with the intention of running sshfs eventaully. 

The host is running zentyal 3.0 which is based on ubuntu 12.4 as I understand it. 

The host is running an ssh server. I can successfully connect to it from other machines. I can also connect from the host to the guest machine with no problems. However I cannot connect from the guest vm to the host zentyal machine.

The guest is briged to the lan. 

Super bob's picture

I thought i'd resolved this issue by using an internal network to communicate with the host. Whilst that resolves the issue with the ssh it breaks ldap authentication in the wiki

Jeremy Davis's picture


ssh user@

If you can then I strongly suspect that it is a DNS issue (I don't see how it could be anything else...) You do have a DNS setup right? Have you confirmed that your entries are correct in there?

Can you ping the hosts name ok from within the guest? (I guess you can? You say in your OP that your hostname resolves ok...)

Are nameservers (DNS) configured correctly in your guest?

IIRC there are also separate options for how and where OpenSSH (the SSH server/client that TKL/Debian/Ubuntu use by default) uses DNS. If that is not configured then it should default to use whatever the system uses but I don't know alot about that...

Out of interest I just tested on a VM I have running here and it could connect to the host fine via IP, but attempting via hostname or FQDN it fails with this message: "ssh: Could not resolve hostname <HOSTNAME>: Name or service not known". But that is because I haven't added my host to my DNS (I can't ping it either)...

If you don't have a DNS setup then I'm guessing that is the reason why it won't work. I suspect that the reason why it is working with your Ubuntu desktop is because Desktops (including Windows and Macs) use additional software (depending on what OS you are using) allows them to find and announce their hostnames over the network. Generally this software is not included in Linux Server OS because it is 'desktop grade' software and it is assumed (rightly or wrongly) that if you have a Server running that you know what you are doing and will either use static IPs with hardcoded hosts file entries or proper local DNS. Given the nature of TKL appliances (minimalist - including only what you need with no wasted space, RAM or CPU cycles...) even if it was included with most Linux Server OS then TKL may still not include it.

If you want to have a go at setting this up on your server then google Avahi and/or Zeroconf - I can't give you any more info than that because I have never mucked around with it...

Super bob's picture

No sorry I don't think i was clear. :)

If i have a single bridged adapter then I cannot connect via ssh from the guest to the host either by name or ip.

DNS resolution works. I can resolve the host ip /name correctly. However if I try to ssh to to the host then the connection is 'reflected' back to the guest. Ie i end up connecting to the guest  NOT the host. SSH reports no errors.

For example if my host IP is and if I do ssh usr@ it will log in as usr but i will get the greeting message from my vm and a quick exploration of the file system indicates that i am on the vm. Of course usr has to exist on the vm

I can prove this with

ssh root@myhost (or root@ I will be able to log in and I will be logged in to the guest ( root does not exist on the host or is disable so I can't log in.

Furthermore I will get the greeting message from the ssh on my guest not the host which looks different

And finally if i make changes to the file system in the session they appear onthe guest file system not the host.

It can't be all connections that are getting reflected because I can query the dns server on the host??

If I add an internal lan (a virtual lan that just allows connections between the host and other vms) then ssh works I can connect externally using the ip of the host on this lan. This would be fine but for some inexplicable reason it breaks the openldap authentication in the mindtouch wiki that is running on the vm. If I delete the internal lan openldap works ok again.

Jeremy Davis's picture

I don't have a system that I can can properly test this on right now. But FWIW running a TKL appliance under VirtualBox on Windows 7 with bridged networking - SSHing from the VM to other remote machines works (I don't have any SHHserver installed on Win).

Can your VM SSH to other machines on the network?

Super bob's picture

Hi appollogies for the delay I had to get back on site to test this.

I installed freeSSHd on a windows box on site and was able to successfully connect to it from the wiki vm and from the host machine. So yes I can, the problem seems to exist between the guest and the host.

Any thoughts?

Add new comment