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

Thread: Remote Desktop all of a sudden stopped working

  1. #1
    Join Date
    Mar 2010
    Location
    Bermuda
    Beans
    70
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Remote Desktop all of a sudden stopped working

    Hey guys,

    I recently setup an ssh tunnel and wrote a script to connect to my Home PC from my laptop no matter where I am.

    I have previously tested this on my own network and multiple other networks while I was over at my friends houses, and it worked completely fine.

    So just now I decided to use it after about a day or two after not using it and now nothing happens. Normally it prompts me for a password and takes about 5 seconds then I am in.

    I'm using openssh, vinagre, and dyndns for the hostname. Here is the script:
    Code:
    #!/bin/sh
    
    ssh -f -L 5900:localhost:5900 axilus.ath.cx \
    	x11vnc -safer -localhost -nopw -once -display :0 \
    	&& sleep 5 \
    	&& vinagre localhost:5900
    Any suggestions?
    Cogito Ergo Sum

  2. #2
    Join Date
    Dec 2006
    Beans
    810

    Re: Remote Desktop all of a sudden stopped working

    Can you ssh in?

  3. #3
    Join Date
    Mar 2010
    Location
    Bermuda
    Beans
    70
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Remote Desktop all of a sudden stopped working

    No I get this message:
    ssh: connect to host 199.172.197.22 port 22: Connection timed out

    I have however already forwarded both port 5900 and 22 with the IP 192.168.1.101 when I set it up the first time.
    Cogito Ergo Sum

  4. #4
    Join Date
    Dec 2006
    Beans
    810

    Re: Remote Desktop all of a sudden stopped working

    Quote Originally Posted by Axilus View Post
    No I get this message:
    ssh: connect to host 199.172.197.22 port 22: Connection timed out
    That is your problem then, you can't ssh to the machine. The problem has nothing to do with remote desktop.
    I have however already forwarded both port 5900 and 22 with the IP 192.168.1.101 when I set it up the first time.
    Why would you forward port 22 through ssh?

    Or are you talking about router port forwarding? From what you say it sounds like you might have some problem with that.

  5. #5
    Join Date
    Mar 2010
    Location
    Bermuda
    Beans
    70
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Remote Desktop all of a sudden stopped working

    Quote Originally Posted by krunge View Post
    Why would you forward port 22 through ssh?

    Or are you talking about router port forwarding? From what you say it sounds like you might have some problem with that.
    Yes I was instructed in the tutorial to do it, and after following that and making the script it worked fine. Now I get the previous mentioned message.

    I went back into my router and the ports 5900 and 22 are still forwarded to 192.168.1.101 and are enabled.
    Cogito Ergo Sum

  6. #6
    Join Date
    Dec 2006
    Beans
    810

    Re: Remote Desktop all of a sudden stopped working

    Quote Originally Posted by Axilus View Post
    I went back into my router and the ports 5900 and 22 are still forwarded to 192.168.1.101 and are enabled.
    You haven't said, but I assume 192.168.1.101 is the private IP of your workstation, correct? Does it still have that IP?

    You should not have your router forward port 5900. You have port 5900 going through the ssh tunnel. Redirecting 5900 is not needed and is insecure. The guide you reference says this too.

    I think you should remove the port 5900 from your router ASAP. You are probably being port scanned on it 10-20 times per day. If you had a VNC server running their w/o passwd (e.g. x11vnc without "-localhost") then they would control your desktop.

    I don't know what do to about your not being able to ssh in. You have something else misconfigured. Perhaps DNS, or a host-level firewall on 192.168.1.101, etc.

    When troubleshooting, run ssh with "-v" for verbose logging. Also examine the access logs on your router (if available) and on your workstation. AFAICS you are not able to even reach the ssh server on the workstation.

  7. #7
    Join Date
    Mar 2010
    Location
    Bermuda
    Beans
    70
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Remote Desktop all of a sudden stopped working

    My private IP has in fact changed from *.*.*.101 to *.*.*.100; Changing that in my router has fixed the problem. Is there anyway to stop it from doing that, or to allow my router to automatically detect the change?

    I also removed the fowarding with 5900 in my router, and is it safe to still have the port 22 forwarded in there? I'm not really a networking guy, but can you please explain why it is insecure?

    Thanks for your help
    Cogito Ergo Sum

  8. #8
    Join Date
    Jan 2006
    Location
    U.S.A.
    Beans
    971
    Distro
    Ubuntu 15.10 Wily Werewolf

    Re: Remote Desktop all of a sudden stopped working

    You can do one of two things:

    a) use a fixed IP address on the sshd machine

    b) if your router supports it, configure dhcp to always issue the same IP address to that machine

    There are other things you can do (e.g., dynamic firewall rules, ipsets, etc.), but they are absurdly complicated compared to those.
    Favorite man page quote: "The backreference \n, where n is a single digit, matches the substring previously matched by the nth parenthesized subexpression of the regular expression." [excerpt from grep(1)]

  9. #9
    Join Date
    Mar 2010
    Location
    Bermuda
    Beans
    70
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Remote Desktop all of a sudden stopped working

    How would I go about doing one of those?
    Cogito Ergo Sum

  10. #10
    Join Date
    Sep 2006
    Location
    Ontario, Canada
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Remote Desktop all of a sudden stopped working

    Quote Originally Posted by Axilus View Post
    How would I go about doing one of those?
    Preferences -> Network Connections -> Ethernet -> Edit -> IPv4 settings -> Manual configuration.

    Set the new IP Address you want to use. Use as gateway your router's IP.
    My Planet, Your Planet: Planet Diaz

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
  •