Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: [SOLVED] 8.04 ssh ok, localhost no. Worked in 7.10

  1. #1
    Join Date
    Jan 2008
    Beans
    8

    Question [SOLVED] 8.04 ssh ok, localhost no. Worked in 7.10

    Hello everyone!

    I wasn't able to find anything with my specific problem. I'm not too familiar with ssh and such, just followed the forums (thanks everyone)!

    I setup a mythbuntu server, and I usually connect via ssh and then type in firefox "localhost/mythweb" to see the recordings and such.

    This has been working perfectly for me in both windows and ubuntu 7.10. For some reason, on a 8.04, (fresh install), the localhost doesn't work. I am able to ssh to my server, via "ssh user@domain.net" and log in, but typing localhost in any program doesn't work (firefox/vinagre/xtightvncviewer)

    I used to be able to login ssh and type localhost for VNCviewer also, and that doesn't work either now. I tried it in my windows machine via putty, and it works perfectly, both vnc and firefox.

    I installed putty in ubuntu, thinking I setup my ssh wrong or something, and it still didn't work. I'm able to ssh, but not use localhost.


    Is there something I'm missing?

  2. #2
    Join Date
    Mar 2007
    Beans
    Hidden!
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    Could you post the output of
    Code:
    cat /etc/hosts
    and
    Code:
    cat /etc/nsswitch.conf | grep hosts

  3. #3
    Join Date
    Jan 2008
    Beans
    8

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    sure, here goes. room is the name of my computer

    127.0.0.1 localhost
    127.0.1.1 room

    cat /etc/hosts
    Code:
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

    cat /etc/nsswitch.conf | grep hosts
    Code:
    hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

  4. #4
    Join Date
    Mar 2007
    Beans
    Hidden!
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    127.0.0.1 localhost
    127.0.1.1 room
    So, wait... those two lines are in your /etc/hosts file or no?

    They need to be if they aren't.

    The whole thing should read like so:
    Code:
    127.0.0.1 localhost
    127.0.1.1 room
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    Your nsswitch.conf looks good.

    It's also possible your loopback interface isn't defined. Does
    Code:
    ifconfig lo
    show something like this?
    Code:
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:664 errors:0 dropped:0 overruns:0 frame:0
              TX packets:664 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:33200 (32.4 KB)  TX bytes:33200 (32.4 KB)

  5. #5
    Join Date
    Jan 2008
    Beans
    8

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    oops, yea, the 127.0.0.1 localhost and 127.0.1.1 room are in my /etc/hosts. just didn't quote it right. doh!

    I think I have the same thing you get when I do ifconfig lo:

    Code:
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:2661 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2661 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:137104 (133.8 KB)  TX bytes:137104 (133.8 KB)

  6. #6
    Join Date
    Mar 2007
    Beans
    Hidden!
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    mmmm... I was expecting to have found the problem by now, but everything looks good.

    So you can ping -c3 localhost when you log in to the command line with ssh, but the problem is restricted to when you use x11 forwarding?

    ...afraid I may be swimming out of my depths at this point.

  7. #7
    Join Date
    Jan 2008
    Beans
    8

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    yea, I login to my server via ssh... and I am able to ping localhost from my command line (new terminal). I don't know what x11 forwarding is, but if that means things like vnc and firefox, then that's my situation.

    Thanks for your effort, jetsam. I appreciate the quick response.

    I'm wondering if I'm the only one or if others ave the same problem. I guess I might have to switch back to an older version.

  8. #8
    Join Date
    Mar 2007
    Beans
    Hidden!
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    There are others, because I have the same problem.

  9. #9
    Join Date
    Mar 2007
    Beans
    Hidden!
    Distro
    Xubuntu 9.10 Karmic Koala

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    OK!

    Figured it out with Firefox anyway-- assuming your problem is the same as what I was seeing.

    Run Firefox like this when you're in your ssh session:
    Code:
    firefox -no-remote
    Otherwise, it will detect an already running instance of Firefox on the local machine and use it.
    Here's the bug report that led me to this. The solution is in the last comment:
    https://bugs.launchpad.net/ubuntu/+s...ox/+bug/214829

    I got quite confused when I realized the problem only happened if I already had Firefox running on the local machine.

    Not sure about vnc. Maybe there's something similar?
    Last edited by jetsam; June 22nd, 2008 at 09:24 PM.

  10. #10
    Join Date
    Jan 2008
    Beans
    8

    Re: 8.04 ssh ok, localhost no. Worked in 7.10

    Thanks for the link. I tried doing firefox -no-remote in ssh, but didn't get it to work unless I put -X in the command
    Code:
    ssh -X user@domain.com firefox -no-remote
    It works, like you said! Thanks, but for me, it's a bit slow. Firefox would get dark as if it's going to freeze, and then go back to normal and work, and then get dark again, and then back and forth. It's a bit too slow for me. Are you using firefox 3?

    I found something that would get vnc working though, it was located here:

    https://help.ubuntu.com/community/VNCOverSSH


    Basically, it said to do this:
    Code:
    vncviewer -via user@domain.com computername:1

    Heads up: when I searched for vncviewer via apt-get, it has been updated to xtightvncviewer.


    I guess this will be a temporary solution for me. But I still would like to get firefox working without having to run another instance through the ssh connection.

    Thanks again!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •