Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 7024

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>X11 Forwarding using SSH</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux XDMCP HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="The Procedure"
HREF="procedure.html"><LINK
REL="NEXT"
TITLE="Troubleshooting"
HREF="ts.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux XDMCP HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="procedure.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="ts.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="SSH"
></A
>3. X11 Forwarding using SSH</H1
><P
>     As I have explained earlier, using XDMCP to display X across Internet is basically a no-no, due to it's lack of
     encryption across the Internet.  One way to enforce the traffic security is to use the SSH by the way of 
     X11 tunnelling or port forwarding.  SSH (Secure Shell) is developed in 1995 by Tatu Ylonen to replace the insecure telnet, ftp,
     scp, rcp, rlogin, rsh, etc.  The first thing you need to know is that X11 forwarding using SSH is different from 
     your regular, non-secure way of running X Window.
  </P
><P
>  
    To start this setup, you need an additional piece of information.  First, you must have your SSH package installed.
    In Linux, they are the OpenSSH packages.  Check your distribution to decide what package you need to install (some installed it
    as standard packages).  Secondly, you need a Windows SSH Client (other OS version, like MAC, are also available).  
    I recommend PuTTY.  It is a wonderful free SSH client and   you can download them from 
    <A
HREF="http://www.chiark.greenend.org.uk/~sgtatham/putty/"
TARGET="_top"
>this link</A
>.  Remember to download the document and read
    them carefully.  The other good free SSH clients are: Tera Term Pro + TTSSH: An SSH Extension to Tera Term, SSH Secure Shell
    Client by SSH.com (only free for non-commercial use).  I will break down again into steps, so it is easy for you to follow.
  </P
><P
></P
><OL
TYPE="1"
><LI
><P
>  Open up the command <B
CLASS="COMMAND"
>putty.exe</B
> by double-click it.  It will brings up the interface.  First,
	 setup the connection info in Host Name (or use IP) field and select SSH (SSH is using port 22).  In Connection Category,
	 find the Connection tree.  In SSH, expand it and you will see Tunnels window.  Click "Enable X11 forwarding".  It is setting the
	 default to X display at "localhost:0".  Now, go back to Session and save this session with a name you like.  I normally use the
	 Host Name to make me easily remember where I am connecting to.
       </P
></LI
><LI
><P
>  In the example of Hummingbird Exceed, this is what you need to do.  (For other X client, the setup is similar).
	 Open up the Xconfig from your Exceed folder.  In your "Screen Definition", change to "Multiple" Window mode and save it.
	 Next, open up your "Communication" icon and set the Startup mode to "Passive".
	</P
></LI
><LI
><P
>  Now you are done.  To test it, first using PuTTY (or other SSH client) to connect to your server.  The first time
	 connection, it will ask you whether you want to cache the Security Key or not.  (Yes is normal choice).  Once log in is done,
	 fire up your Exceed.  It will stay in the background.  Now you can execute any of your X application and it should forward the
	 X application via SSH to your local screen.  For example:
	 
	 <TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>$ xclock &#38;</PRE
></FONT
></TD
></TR
></TABLE
>
	
	</P
><P
>  We should now see the  Xclock is running on your local screen. </P
></LI
></OL
><P
>  
     Now you see the difference is that you do not see all your X Window.  You are simply running X application one by one and
     forwarding via SSH to your local screen.  Therefore, you need to know the command for running each X application.  All the
     control are done via SSH client window.  To me, the security is worthy than the slightly inconvenience!
   </P
><P
>  
     Hummingbird Exceed's newer version now support the SSH connection.  I am sure other X application may be able to do the same in their
     latest new version.  Check the application web site you are using or the <A
HREF="#REFS"
TARGET="_top"
>Resources</A
> belowfor for more details).
   </P
><P
>If you are using X-Win32 and you want to use <A
HREF="http://www.starnet.com/products/ssh.htm"
TARGET="_top"
>SSH with Port Forwarding</A
>,
     you can use this reference to set it up.
   </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="procedure.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="ts.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>The Procedure</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Troubleshooting</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>