9.4. More Than a Secure Shell
A secure command line interface is just the beginning of the many ways SSH can be used. Given the proper amount of bandwidth, X11 sessions can be directed over an SSH channel. Or, by using TCP/IP forwarding, previously insecure port connections between systems can be mapped to specific SSH channels.
To open an X11 session over an SSH connection, use a command in the following form:
ssh -Y username
@hostname
For example, to log in to a remote machine named penguin.example.com
with john
as a username, type:
~]$ ssh -Y [email protected]
[email protected]'s password:
When an X program is run from the secure shell prompt, the SSH client and server create a new secure channel, and the X program data is sent over that channel to the client machine transparently.
X11 forwarding can be very useful. For example, X11 forwarding can be used to create a secure, interactive session of the Printer Configuration utility. To do this, connect to the server using ssh and type:
~]$ system-config-printer &
The Printer Configuration Tool will appear, allowing the remote user to safely configure printing on the remote system.