View previous topic :: View next topic |
Author |
Message |
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Mon Feb 28, 2005 6:46 pm Post subject: Is there a x11 tunneling over ssh guide for dummies? |
|
|
I did this a long time ago, and I don't remember it being difficult at all before. I have my desktop linux machine at home with X-org on it. I want to be able to use X programs on my linux box from work on a windows machine. So I installed Cygwin/X and it works fine. Well, glxgears and xclock work in Cygwin. I've tried following the instructions on Cygwins site, but it doesn't work. I've searched the forums and found some threads to help, but i can't get it working. I always get the "Can't open display:" error.
My X server doesn't seem to be registering a DISPLAY variable. When I type "env", there is no DISPLAY variable. So obviously I haven't done something I need to. All of the docs and forum threads I have found assume you have a working DISPLAY variable.
So, is there a nice easy straight forward guide for setting this up?
Thanks _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
Leprechaun n00b
Joined: 04 Oct 2003 Posts: 49 Location: Minnesota, USA
|
Posted: Mon Feb 28, 2005 7:13 pm Post subject: |
|
|
I also use Cygwin at work to get to my linux box at home. Only too glad to throw my $0.02 in.
My DISPLAY variable on my work machine is set to "127.0.0.1:0.0". What happens if you set DISPLAY manually?
Code: | declare -x DISPLAY="127.0.0.1:0.0" |
I would suggest attempting to manually set your DISPLAY variable and see what works. If we can get X forwarding to work, figuring out how to set the DISPLAY automatically should be relatively easy.
Also, make sure you're using X forwarding in ssh!
rather than |
|
Back to top |
|
|
flazz Guru
Joined: 22 Nov 2003 Posts: 496 Location: Florida
|
Posted: Mon Feb 28, 2005 7:14 pm Post subject: |
|
|
/etc/ssh/sshd_config on the x client(the ssh server):
/etc/ssh/ssh_config on the x server(the machine you are on):
on the x client do Code: | /etc/init.d/sshd restart |
|
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Tue Mar 01, 2005 7:28 am Post subject: |
|
|
Thanks for the replies. I have the settings in /etc/ssh/sshd_config set properly. I'll try declare -x DISPLAY="127.0.0.1:0.0" tomorrow when I'm at work. _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Tue Mar 01, 2005 11:43 pm Post subject: |
|
|
OK. I still can't get it to work. Here is exactly what I am doing and after I have a few questions.
GOAL: Connect to my Linux box at home from my windows workstation at work and load X-based apps, such as X-chat.
What I have tried so far:
1. Start Cygwin on my windows box.
2. Launch the Cygwin X server by running "startxwin.sh"
3. Verify Cygwin X server is working by starting xcalc.
4. Try to connect to my linux box at home using ssh by typing "ssh -l username -X IPofMyHomeBox (I have also tried -Y instead of -X at this step)
5. Once connected to my linux box at home, I type "declare -x DISPLAY="127.0.0.1:0.0"" in the ssh session to my linux box.
6. I then try to launch xcalc by typing "xcalc" in the ssh session to my linux box.
7. I get the error: "Error: Can't open display: 127.0.0.1:0.0"
I usually don't have X running on my linux box at home. I have tried this both with and without X running.
There was a suggestion to put "X11Forwarding yes" and "ForwardX11 yes" in my sshd_config file. I put both in my sshd_config file on my linux box at home; however, I couldn't find this file in Cygwin on my windows box. Is there a file for the Cygwin ssh that I should add these variables to? Is there something I need to configure for X on my linux box at home, to allow it to send the display to me at work over ssh?
Thanks. _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
Trejkaz Guru
Joined: 14 Nov 2002 Posts: 479 Location: Sydney, Australia
|
Posted: Wed Mar 02, 2005 2:19 am Post subject: |
|
|
I just tested a similar thing from here, and it works in my case so here's a stab in the dark: I'm running SSH from an XTerm inside the Cygwin X environment. Are you running it from inside or outside? |
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Wed Mar 02, 2005 3:36 am Post subject: |
|
|
i'm running ssh from inside cygwin.
Have you configured X in any special way on the remote machine? _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
jklmnop n00b
Joined: 18 Jun 2003 Posts: 42
|
Posted: Wed Mar 02, 2005 5:57 am Post subject: |
|
|
try this...
Code: |
# ssh into the remote machine
$ ssh -X user@foo
# check netstat
foo user $ netstat -an
...
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
...
# you should see a socket listening on port 6010 (or maybe 6011 or 6012)
# this is the port ssh sets up for X forwarding
# check DISPLAY
foo user $ echo $DISPLAY
localhost:10.0
# note: display 10 == port 6010; display 11 == port 6011; ...
# if this isn't set try setting it.
foo user $ export DISPLAY=localhost:10
# test
foo user $ xterm
|
|
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Wed Mar 02, 2005 4:07 pm Post subject: |
|
|
jklmnop wrote: | try this...
Code: |
# ssh into the remote machine
$ ssh -X user@foo
# check netstat
foo user $ netstat -an
...
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
...
# you should see a socket listening on port 6010 (or maybe 6011 or 6012)
# this is the port ssh sets up for X forwarding
# check DISPLAY
foo user $ echo $DISPLAY
localhost:10.0
# note: display 10 == port 6010; display 11 == port 6011; ...
# if this isn't set try setting it.
foo user $ export DISPLAY=localhost:10
# test
foo user $ xterm
|
|
I noticed one stupid thing I did. I didn't realize there was a sshd_config and I was editing ssh_config. So I made sure I put "X11Forwarding yes" in /etc/ssh/sshd_config and restarted sshd.
I also made sure "ForwardX11 yes" is in ssh_config on my cygwin install; however, it is my understanding that this just eliminates the need to put -X when starting an ssh session.
I followed your instructions and when I type "netstat -an" in the remote terminal, there is no entry like the one you said to look for. So, since I don't usually have X running, I also tried starting a "screen" session and ran startx so X was running. I hit Ctrl-a-d to disconnect from the screen session without killing X. I then exited my ssh session and tried your instructions from the beginning. Again, I couldn't find any related entry when i typed "netstat -an"
Here is my output of "netstat -an" with X already running on the machine. Sorry for the long post.
Code: | Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:712 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5335 0.0.0.0:* LISTEN
tcp 0 272 192.168.70.10:22 999.999.999.99:1126 ESTABLISHED
udp 0 0 0.0.0.0:5353 0.0.0.0:*
udp 0 0 0.0.0.0:111 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 94262 /tmp/orbit-root/linc-45e9-0-197880881bb77
unix 2 [ ACC ] STREAM LISTENING 94594 /tmp/orbit-root/linc-4626-0-7462351a2b21e
unix 2 [ ACC ] STREAM LISTENING 94336 /tmp/orbit-root/linc-45f8-0-67ab0d8275d63
unix 2 [ ACC ] STREAM LISTENING 94365 /tmp/orbit-root/linc-45fd-0-197880889a7b5
unix 2 [ ACC ] STREAM LISTENING 94405 /tmp/orbit-root/linc-4601-0-19788088bd8aa
unix 2 [ ACC ] STREAM LISTENING 94420 /tmp/orbit-root/linc-45ff-0-19788088c775f
unix 2 [ ACC ] STREAM LISTENING 94447 /tmp/orbit-root/linc-460a-0-72943df1dc0bb
unix 2 [ ACC ] STREAM LISTENING 10487 /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 94498 /tmp/orbit-root/linc-4613-0-b1cc4ca2de89
unix 2 [ ACC ] STREAM LISTENING 94008 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 94085 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 2 [ ] DGRAM 13003 @/var/run/hal/hotplug_socket
unix 2 [ ACC ] STREAM LISTENING 94094 /tmp/orbit-root/linc-45db-0-297a0496a2814
unix 2 [ ACC ] STREAM LISTENING 94211 /tmp/.ICE-unix/17883
unix 2 [ ACC ] STREAM LISTENING 12905 /var/lib/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 94220 /tmp/keyring-ILMYle/socket
unix 2 [ ACC ] STREAM LISTENING 94230 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 2 [ ACC ] STREAM LISTENING 10408 /dev/log
unix 2 [ ] DGRAM 1082 @udevd
unix 2 [ ACC ] STREAM LISTENING 94525 /tmp/mapping-root
unix 2 [ ACC ] STREAM LISTENING 94541 /tmp/orbit-root/linc-4618-0-b1cc4ca5f4af
unix 3 [ ] STREAM CONNECTED 94959
unix 3 [ ] STREAM CONNECTED 94958
unix 3 [ ] STREAM CONNECTED 94609 /tmp/orbit-root/linc-45fd-0-197880889a7b5
unix 3 [ ] STREAM CONNECTED 94608
unix 3 [ ] STREAM CONNECTED 94607 /tmp/orbit-root/linc-4626-0-7462351a2b21e
unix 3 [ ] STREAM CONNECTED 94606
unix 3 [ ] STREAM CONNECTED 94601 /tmp/orbit-root/linc-4626-0-7462351a2b21e
unix 3 [ ] STREAM CONNECTED 94600
unix 3 [ ] STREAM CONNECTED 94599 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94598
unix 3 [ ] STREAM CONNECTED 94597 /tmp/orbit-root/linc-4626-0-7462351a2b21e
unix 3 [ ] STREAM CONNECTED 94596
unix 3 [ ] STREAM CONNECTED 94593 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94592
unix 3 [ ] STREAM CONNECTED 94587 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94586
unix 3 [ ] STREAM CONNECTED 94556 /tmp/orbit-root/linc-45fd-0-197880889a7b5
unix 3 [ ] STREAM CONNECTED 94555
unix 3 [ ] STREAM CONNECTED 94554 /tmp/orbit-root/linc-4618-0-b1cc4ca5f4af
unix 3 [ ] STREAM CONNECTED 94553
unix 3 [ ] STREAM CONNECTED 94548 /tmp/orbit-root/linc-4618-0-b1cc4ca5f4af
unix 3 [ ] STREAM CONNECTED 94547
unix 3 [ ] STREAM CONNECTED 94546 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94545
unix 3 [ ] STREAM CONNECTED 94544 /tmp/orbit-root/linc-4618-0-b1cc4ca5f4af
unix 3 [ ] STREAM CONNECTED 94543
unix 3 [ ] STREAM CONNECTED 94540 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94539
unix 3 [ ] STREAM CONNECTED 94534 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94533
unix 3 [ ] STREAM CONNECTED 94529 /tmp/mapping-root
unix 3 [ ] STREAM CONNECTED 94521
unix 3 [ ] STREAM CONNECTED 94513 /tmp/orbit-root/linc-45fd-0-197880889a7b5
unix 3 [ ] STREAM CONNECTED 94512
unix 3 [ ] STREAM CONNECTED 94511 /tmp/orbit-root/linc-4613-0-b1cc4ca2de89
unix 3 [ ] STREAM CONNECTED 94510
unix 3 [ ] STREAM CONNECTED 94505 /tmp/orbit-root/linc-4613-0-b1cc4ca2de89
unix 3 [ ] STREAM CONNECTED 94504
unix 3 [ ] STREAM CONNECTED 94503 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94502
unix 3 [ ] STREAM CONNECTED 94501 /tmp/orbit-root/linc-4613-0-b1cc4ca2de89
unix 3 [ ] STREAM CONNECTED 94500
unix 3 [ ] STREAM CONNECTED 94497 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94496
unix 3 [ ] STREAM CONNECTED 94491 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94490
unix 3 [ ] STREAM CONNECTED 94470 /tmp/orbit-root/linc-460a-0-72943df1dc0bb
unix 3 [ ] STREAM CONNECTED 94469
unix 3 [ ] STREAM CONNECTED 94468 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94467
unix 3 [ ] STREAM CONNECTED 94466 /tmp/.famhXAGBk
unix 3 [ ] STREAM CONNECTED 94465
unix 3 [ ] STREAM CONNECTED 94458 /var/lib/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 94457
unix 3 [ ] STREAM CONNECTED 94456 /tmp/orbit-root/linc-45ff-0-19788088c775f
unix 3 [ ] STREAM CONNECTED 94455
unix 3 [ ] STREAM CONNECTED 94454 /tmp/orbit-root/linc-460a-0-72943df1dc0bb
unix 3 [ ] STREAM CONNECTED 94453
unix 3 [ ] STREAM CONNECTED 94450 /tmp/orbit-root/linc-460a-0-72943df1dc0bb
unix 3 [ ] STREAM CONNECTED 94449
unix 3 [ ] STREAM CONNECTED 94446 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94445
unix 3 [ ] STREAM CONNECTED 94437 /tmp/orbit-root/linc-45ff-0-19788088c775f
unix 3 [ ] STREAM CONNECTED 94436
unix 3 [ ] STREAM CONNECTED 94435 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94434
unix 3 [ ] STREAM CONNECTED 94431 /tmp/.famRRrce5
unix 3 [ ] STREAM CONNECTED 94430
unix 3 [ ] STREAM CONNECTED 94423 /tmp/orbit-root/linc-45ff-0-19788088c775f
unix 3 [ ] STREAM CONNECTED 94422
unix 3 [ ] STREAM CONNECTED 94419 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94418
unix 3 [ ] STREAM CONNECTED 94410 /var/lib/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 94409
unix 3 [ ] STREAM CONNECTED 94408 /tmp/orbit-root/linc-4601-0-19788088bd8aa
unix 3 [ ] STREAM CONNECTED 94407
unix 3 [ ] STREAM CONNECTED 94404 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94403
unix 3 [ ] STREAM CONNECTED 94402 /tmp/.ICE-unix/17883
unix 3 [ ] STREAM CONNECTED 94401
unix 3 [ ] STREAM CONNECTED 94396 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94395
unix 3 [ ] STREAM CONNECTED 94390 /tmp/.ICE-unix/17883
unix 3 [ ] STREAM CONNECTED 94389
unix 3 [ ] STREAM CONNECTED 94384 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94383
unix 3 [ ] STREAM CONNECTED 94380 /tmp/.famfPSVXP
unix 3 [ ] STREAM CONNECTED 94379
unix 3 [ ] STREAM CONNECTED 94372 /tmp/orbit-root/linc-45fd-0-197880889a7b5
unix 3 [ ] STREAM CONNECTED 94371
unix 3 [ ] STREAM CONNECTED 94370 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94369
unix 3 [ ] STREAM CONNECTED 94368 /tmp/orbit-root/linc-45fd-0-197880889a7b5
unix 3 [ ] STREAM CONNECTED 94367
unix 3 [ ] STREAM CONNECTED 94364 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94363
unix 3 [ ] STREAM CONNECTED 94362 /tmp/.ICE-unix/17883
unix 3 [ ] STREAM CONNECTED 94361
unix 3 [ ] STREAM CONNECTED 94356 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94355
unix 3 [ ] STREAM CONNECTED 94348 /tmp/.ICE-unix/17883
unix 3 [ ] STREAM CONNECTED 94347
unix 3 [ ] STREAM CONNECTED 94341 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94340
unix 3 [ ] STREAM CONNECTED 94339 /tmp/orbit-root/linc-45f8-0-67ab0d8275d63
unix 3 [ ] STREAM CONNECTED 94338
unix 3 [ ] STREAM CONNECTED 94335 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94334
unix 3 [ ] STREAM CONNECTED 94326 /tmp/orbit-root/linc-45e9-0-197880881bb77
unix 3 [ ] STREAM CONNECTED 94325
unix 3 [ ] STREAM CONNECTED 94321 /tmp/orbit-root/linc-45e9-0-197880881bb77
unix 3 [ ] STREAM CONNECTED 94320
unix 3 [ ] STREAM CONNECTED 94319 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94318
unix 3 [ ] STREAM CONNECTED 94324 /tmp/.ICE-unix/17883
unix 3 [ ] STREAM CONNECTED 94296
unix 3 [ ] STREAM CONNECTED 94290 /tmp/.famxRcY7A
unix 3 [ ] STREAM CONNECTED 94289
unix 3 [ ] STREAM CONNECTED 94265 /tmp/orbit-root/linc-45e9-0-197880881bb77
unix 3 [ ] STREAM CONNECTED 94264
unix 3 [ ] STREAM CONNECTED 94261 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94260
unix 3 [ ] STREAM CONNECTED 94255 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94254
unix 3 [ ] STREAM CONNECTED 94248 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94247
unix 3 [ ] STREAM CONNECTED 94236 /tmp/orbit-root/linc-45db-0-297a0496a2814
unix 3 [ ] STREAM CONNECTED 94235
unix 3 [ ] STREAM CONNECTED 94234 /tmp/orbit-root/linc-45e5-0-13fa0085c1b95
unix 3 [ ] STREAM CONNECTED 94233
unix 3 [ ] STREAM CONNECTED 94192 /tmp/orbit-root/linc-45db-0-297a0496a2814
unix 3 [ ] STREAM CONNECTED 94191
unix 3 [ ] STREAM CONNECTED 94190 /tmp/orbit-root/linc-45dd-0-e0c8828a17f5
unix 3 [ ] STREAM CONNECTED 94093
unix 3 [ ] STREAM CONNECTED 94080 /dev/log
unix 3 [ ] STREAM CONNECTED 94079
unix 3 [ ] STREAM CONNECTED 94072 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94071
unix 5 [ ] STREAM CONNECTED 94068 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 94020
unix 3 [ ] STREAM CONNECTED 14868 /dev/log
unix 3 [ ] STREAM CONNECTED 14867
unix 3 [ ] STREAM CONNECTED 14764 /dev/log
unix 3 [ ] STREAM CONNECTED 14763
unix 3 [ ] STREAM CONNECTED 13002 /var/lib/dbus/system_bus_socket
unix 3 [ ] STREAM CONNECTED 13001
unix 3 [ ] STREAM CONNECTED 12908
unix 3 [ ] STREAM CONNECTED 12907 |
I changed my real ip at work that was in the list to 999.999.999.99 to protect the innocent.
One thing to note, is my box at home is behind a firewall and I am using nat. I have several machines running ssh, so to connect to my personal machine, I forward port 26 requests at the firewall to port 22 on my personal box for ssh. Maybe this is the cause of my problem? I didn't mention it earlier, because I haven't had any problems before with any of the port forwarded services on my network.
Also, you mentioned there should be an entry for port 6010 for forwarding X11. Do I need to open my firewall for this port? _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
Antek Grzymala n00b
Joined: 02 Jul 2004 Posts: 40 Location: Warsaw, Poland, EU
|
Posted: Wed Mar 02, 2005 5:25 pm Post subject: |
|
|
There seem to be a lot of convoluted answers on this thread.
Hope this simple solution will clear things up:
On the server, edit the /etc/ssh/sshd_config and make sure you have:
On the client ssh into the remote host with the -Y or -X options. ssh will set the correct DISPLAY variable on the remote host for you. Usually you'll not need to fiddle with that.
You may also get away without all the cygwin mess, I have a config with a free xdeep32 X-server running natively on Windows and PuTTY doing the X-Forwarding (a simple tick in the tunnelling options). Works out-of-the-box.
Hope this helps.
Cheers,
[a] _________________ Antek Grzymala |
|
Back to top |
|
|
battra Tux's lil' helper
Joined: 09 Nov 2004 Posts: 77
|
Posted: Wed Mar 02, 2005 5:51 pm Post subject: |
|
|
I like this solution better than cygwin and X11 forwarding. With tightvnc, you can view your complete linux desktop on your Windows machine at work. If you want to secure it through an ssh tunnel, use Putty on your windows machine.
Follow this guide:
http://www.benjamin.weiss.name/putty-tunnel.html |
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Wed Mar 02, 2005 6:37 pm Post subject: |
|
|
Antek Grzymala wrote: | You may also get away without all the cygwin mess, I have a config with a free xdeep32 X-server running natively on Windows and PuTTY doing the X-Forwarding (a simple tick in the tunnelling options). Works out-of-the-box. |
Do you have X running on the remote machine?
I tried using xdeep, and it didn't work for me. It seems the real problem is, I never have a DISPLAY variable that works on the remote machine. _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Wed Mar 02, 2005 6:39 pm Post subject: |
|
|
battra wrote: |
I like this solution better than cygwin and X11 forwarding. With tightvnc, you can view your complete linux desktop on your Windows machine at work. If you want to secure it through an ssh tunnel, use Putty on your windows machine.
Follow this guide:
http://www.benjamin.weiss.name/putty-tunnel.html |
I've done this before, but my upload bandwidth sucks. I thought that using x over ssh might use less upload bandwidth from my remote machine. _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
Antek Grzymala n00b
Joined: 02 Jul 2004 Posts: 40 Location: Warsaw, Poland, EU
|
Posted: Wed Mar 02, 2005 10:58 pm Post subject: |
|
|
ryker wrote: | Antek Grzymala wrote: | You may also get away without all the cygwin mess, I have a config with a free xdeep32 X-server running natively on Windows and PuTTY doing the X-Forwarding (a simple tick in the tunnelling options). Works out-of-the-box. |
Do you have X running on the remote machine?
I tried using xdeep, and it didn't work for me. It seems the real problem is, I never have a DISPLAY variable that works on the remote machine. |
Nope, I don't have X running on the remote machine. It does not make any difference: even if there was X running locally on the remote machine, you wouldn't get a DISPLAY variable corresponding to that X-server (on the remote machine) when logging in via SSH. However, if you logged in with X forwarding you'd get a DISPLAY variable that corresponds to your local X-server (the one, that get's connections to it forwarded over SSH). You may try fiddling with your XDeep preferences as to allow all incoming connections (not exactly safe, but good for testing) -- maybe there's something wrong here.
As I said, in my case it's only "X11Forwarding on" on the remote server (maybe you need to restart your remote sshd after having added this option); running xdeep in windows (or plain X in linux); ssh-ing with x-forwarding on. No additional setting anything needed.
The suggestion to use VNC makes some sense, as with low-quality JPEG compression (and no fancy desktop backgrounds) it seems much faster than the X-protocol (which is so slooowww).
Regards,
[a] _________________ Antek Grzymala |
|
Back to top |
|
|
Lews_Therin l33t
Joined: 03 Oct 2003 Posts: 657 Location: Banned
|
Posted: Wed Mar 02, 2005 11:32 pm Post subject: |
|
|
Can you post the entire contents of /etc/ssh/sshd_config of the machine you're logging into remotely? |
|
Back to top |
|
|
Antek Grzymala n00b
Joined: 02 Jul 2004 Posts: 40 Location: Warsaw, Poland, EU
|
Posted: Thu Mar 03, 2005 12:26 pm Post subject: |
|
|
Lews_Therin wrote: | Can you post the entire contents of /etc/ssh/sshd_config of the machine you're logging into remotely? |
Well... Yes. Not, that it's any sort of revelation :)
Code: | Protocol 2
PasswordAuthentication no
UsePAM yes
X11Forwarding yes
Subsystem sftp /usr/lib/misc/sftp-server
AllowUsers <some_users> |
Cheers,
[a] _________________ Antek Grzymala |
|
Back to top |
|
|
flazz Guru
Joined: 22 Nov 2003 Posts: 496 Location: Florida
|
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Thu Mar 03, 2005 5:18 pm Post subject: |
|
|
I'll try to post the contents of my sshd_config a little later. I'm running something in windows right now. I know the only thing I changed/added was "X11Forwarding yes".
Why do the simplest things never work for me? _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
hohlecow n00b
Joined: 20 Aug 2003 Posts: 66 Location: Scottsdale, Beverly Hills of the Southwest
|
Posted: Wed Mar 09, 2005 11:40 pm Post subject: |
|
|
did you ever get this figured out? i set it up correctly with my system that was installed about 2 years ago, but the system it doesn't work was based of a 2004.3 install.
the problem i'm running into is i have /etc/ssh and /etc/ssh2, and the /etc/init.d/sshd script wasn't correct for my version of ssh (tried passing parameters to ssh-keygen that it didn't have).
so i copied over /etc/ssh/* from my working system to my non-working system, and its still not working. my old system does not have /etc/ssh2.
just a side thought. what if you compiled OpenSSH with USE="... -X ..."? would that affect whether it can port forward or not? (i didn't think i was going to be needing X on the system until much later in the install) _________________ ...dig me
but don't
bury me...
http://hohle.net/potd.php |
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Thu Mar 10, 2005 1:39 am Post subject: |
|
|
I never did figure out what my problem is. I've been playing a lot of Counter-Strike Source lately. So I have been forced to stay in Windows, since it's not available for Linux. I also never posted my sshd_config file.
Here is my sshd_config:
Code: | Protocol 2
PasswordAuthentication no
UsePAM yes
X11Forwarding yes
Subsystem sftp /usr/lib/misc/sftp-server
|
This is from the default install, except I uncommented X11Forwarding and put yes instead of no. _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
hohlecow n00b
Joined: 20 Aug 2003 Posts: 66 Location: Scottsdale, Beverly Hills of the Southwest
|
Posted: Thu Mar 10, 2005 1:47 pm Post subject: |
|
|
i got mine working by remerging openssh, overwriting /etc/ssh/sshd_config, and removing my ssh keys (you may not have to do the last one).
like everyone else has said i uncommented
AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
and connected with ssh -X.
i think my original build of openssh was crap. i couldn't restart the ssh server when i was ssh'd in, the init.d/ssh script wouldn't generate keys if they didn't exist (wrong parameters to ssh-keygen), and of course the X forwarding thing. but after a re-compile, everything seems to be working. hope that helps. _________________ ...dig me
but don't
bury me...
http://hohle.net/potd.php |
|
Back to top |
|
|
menschmeier l33t
Joined: 15 Dec 2004 Posts: 727
|
Posted: Thu Mar 10, 2005 4:10 pm Post subject: |
|
|
Hi,
I like VNC via a ssh tunnel. That is very easy an give you a high flexibilty - you can access the system even via a java enabled web browser.
Emerge tightvnc and then look there if you like for the ssh tunnel:
http://www.uk.research.att.com/archive/vnc/sshvnc.html
CU
menschmeier _________________ Please notice the back of this message. |
|
Back to top |
|
|
ryker Guru
Joined: 28 May 2003 Posts: 412 Location: Portage, IN
|
Posted: Tue Mar 29, 2005 5:36 pm Post subject: |
|
|
Well, I took your suggestions and used vnc. Works fine. I never did get X11 tunneling working and I have no idea why. I have gotten it working with other machines. Thanks everyone for the help. _________________ Athlon 64 3200+, 80G WD sata hd + 200G IDE, 1G Geil DDR400, MSI K8T Neo
IntelCore2Duo 2.0Ghz MSI laptop,100G SATA hd, 2G RAM |
|
Back to top |
|
|
|