Wednesday, May 25, 2011

Starting a remote cygwin connection to ibm cloud server

Configuring cygwin to open a remote client to linux (RHEL5.4)
1. Download and install cygwin on your windows box
Required packages include xorg-server, xterm, xauth, openssh and an editor such as vim. Also you can get xclock and xcalculator which are handy utilities
2. Start cygwin from either the windows START button or desktop icon if you opted for an icon to install
3. $startxwin //starts the x server
this should popup an xterm on your windows box
4.
$xhost +127.0.0.1
$xhost +localhost
check the required entries in /etc/hosts
127.0.0.1 localhost
5. $export DISPLAY=localhost:0.0
6. $ssh -X user@host -i key
The above should open a terminal to the remote server with prompt
7. Check X11Forwarding
$echo $DISPLAY
or
$envgrep DISPLAY
DISPLAY=localhost:10.0

That's it! You should be able to start up remote X client software such as cogconfig.

A couple of other troubleshooting pointers. If xterm still won't start or an error displays:
a) under the home directory check ~/.ssh/ssh_config file
Host *
X11Forwarding yes

b)Check the global /etc/ssh/sshd_config
X11Forwarding yes

c) Check the gloabl /etc/ssh/ssh_config
X11Forward yes