Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having a problem and I don't understand the root cause.

Situation

  1. I used to have a decent router running Tomato but it died.
  2. I bought a new one and had it installed/running past return date before finding out that it didn't support Tomato or DD-WRT, so running with stock admin.
  3. Windows 7 machine (win7) as client, Ubuntu server (boopsie) hosting Git.
  4. boopsie is a static entry in router (192.168.1.2)
  5. win7 has a host entry in C:\Windows\System32\drivers\etc\hosts: 192.168.1.2 boopsie
  6. Using PuTTY & ping work fine from win7 using hostname boopsie and/or ip 192.168.1.2.
  7. ipconfig /all shows dns source as being the router.

Issues

  1. on win7, FileZilla cannot resolve host boopsie but works fine with 192.168.1.2
  2. from win7, git fails with "cannot locate host"
  3. from win7, plink can't connect to boopsie by hostname - it's appending .home and going to a totally different ip:

c:\me>plink -v me@boopsie

Looking up host "boopsie.home"

Connecting to 67.220.66.112 port 22

But command line works fine:

c:\me>ping boopsie
Pinging boopsie[192.168.1.2] with 32 bytes of data:
Reply from 192.168.1.2: bytes=32 time<1ms TTL=64

Questions

  1. Why is plink appending .home and trying to reach a different ip address?
  2. Is FileZilla doing the same thing?
  3. How can I resolve this so I can use boopsie's hostname instead of IP? I know I can run DNS on boopsie, but the issue seems to be localized to win7's resolution of names, so I'd like to start with that.
share|improve this question
    
I had the same issue and just resolved it by running the following command at the prompt: > set GIT_SSH= where the right side of = is no value. Also was helpful to set GIT_TRACE=1 which then showed the git commands as they were being run. –  lonstar Mar 12 '13 at 5:42
add comment

1 Answer

Is your domain suffix (and/or connection specific domain suffix)

.home

?

What does

ping boopsie.home

do?

DNS is hierarchical and your hosts file should have an entry for the name + suffix as well:

192.168.1.2 boopsie boopsie.home

If indeed your domain suffix is ".home".

share|improve this answer
    
Sorry, I can't get the markdown right. I added the .home entry but it doesn't seem to make any difference. plink works fine > c:\me>plink me@boopsie > Using username "me". > Passphrase for key "mykey": > Last login: Tue Mar 12 00:17:00 2013 from 192.168.1.1 > ~me@boopsie:~$ exit > logout but git pull fails (this is a git repo folder) > c:\me>git pull > fatal: The remote end hung up unexpectedly –  lonstar Mar 12 '13 at 5:27
    
I figured it out with the setting GIT_SSH to empty as above, but I appreciate the comment. Still don't know why the .home is being appended to my hostnames but adding the entries as you recommended ended the issues I had with that aspect of the problem. Thanks. –  lonstar Mar 12 '13 at 5:43
    
I suspect that .home is the out-of-the-box default domain suffix for the home version of the OS. –  user168261 Mar 12 '13 at 13:34
    
You may want to think about running an instance of Unbound (excellent DNS caching resolver) on boopsie. Let it be the a local DNS cache for your internal network. It can serve up local data plus either forward or resolve the non-local queries. No hosts file edit needed. –  user168261 Mar 12 '13 at 13:41
    
I guess I just expect too much of my router firmware, since it's handling all the IP traffic anyway. I think I will try DDWRT and if it blows up my router try to find cash for a better one. –  lonstar Mar 18 '13 at 3:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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