Setting up X forwarding over SSH



My OraFAQ Blog

Contact me

If you want to run any of Oracle's GUI tools from a remote machine -- for example, to install Oracle on a remote machine -- you may need to set up X forwarding over SSH.

Step 1: Add the server's IP and name to your hosts file

Edit the file and add something like:	# My Oracle server

Step 2: Set your display variable and start X on your machine

Set your display environment variable to [your IP address]:0 and start X. This example assumes you're using Bash (the default for Cygwin), and that your IP address is :
$ export DISPLAY=
$ startx &

Step 3: Ssh into the remote machine

You may want to use a different shell prompt for this command, because the window you used above will be cluttered with X messages. On most systems, "startx" will have popped up an xterm; use that.

$ ssh -l oracle -Y -b's password:
Warning: No xauth data; using fake authentication data for X11 forwarding.

You're now logged in to the remote machine. Any X programs you tell it to run will pop up on your local display.

Step 4: Run X programs

Test your X setup by running a simple program like xeyes or xclock.

[]$ xeyes &

Note: Proofread any scripts before using. Always try scripts on a test instance first. I'm not responsible for any damage, even if you somehow manage to make my scripts corrupt every last byte of your data, set your server on fire and serve you personally with an eviction notice from your landlord!
All scripts and tips © Natalka Roshak 2001-2005.
Enjoy the FREE tips folks...