Lesson 6
Remote Access
This lesson familarizes the student with some very powerful remote
access methods. The first package is the Secure Shell package
(SSH) and is a must in any environment where security is important.
Your canned RedHat installation included this package by default.
A second method of remote access is very slick and quite useful
when only a few applications are needed from a remote computer.
The third method of remote access is the Virtual Network Computing
package (VNC) which is basically a free distribution very much like the
PC AnyWhere program for Windows.
Remote Access with SSH
- As mentioned in the opening paragraph, SSH is installed by
default on your system. You'll need to determine if the ssh daemon
is running.
- Follow the path Main Menu --> System Settings --> Server
Settings --> Services. Scroll down to the ssh daemon. Is
it selected to start at boot time? If not, what do you do?
Have your instructor or a fellow student assist you with this task.
- Another method for determined the status of the sshd daemon is
to type 'ntsysv' at the command prompt in a shell.
- Before a remote session, identical accounts on both the host and
guest systems will simplify your efforts.
- Now your ready to perform a remote ssh login. This login
can be conducted at the command prompt in a shell or at runlevel 3.
The command is 'ssh <hostname>'. The hostname is an
alias assigned to the computer by the administrator. On the
Sinclair network PC's running Linux commonly will not be given
hostnames. This is overcome by replacing the hostname with the IP
of the host computer. For example, ssh 140.106.79.69.
The first time you attempt to log into a host system you'll receive a
message. This message and the response you should provide are
located on pages 576-577 of your textbook.
- Now that you're in the host system review the contents of your
home directory and find a file you'd like to copy to your system.
- Using the 'scp' command copy the file identified in the previous
step to your system. My suggestion is to copy this file to your
NFS shared area. This step is documented on page 528 of your
textbook.
Traditional Method of Remote Access
This method is covered in very good detail on pages 187 - 188 of your
textbook. I'll include the important steps necessary to run an
application on a remote computer and display it on your desktop.
- Open a Terminal Window on the local computer.
- Allow access for the remote computer to the local X display with
the following command; 'xhost +remote_computer_name'.
- Log into the remote computer using the Secure Shell method of
login. 'ssh -l username remote_computer_name'.
- Provide the correct password for the username when requested.
- Set the DISPLAY variable on the remote computer to your local
computer. This is accomplished with the following command: 'export
DISPLAY=remote_computer_name:0'
- The remote and local computer are now ready to have an
application executed on the remote computer with the output displayed on
the local computer.
- Some examples of applications to run are;
- xterm
- mozilla
- redhat-config-nfs
- evolution
- oowriter
- ooimpress
- oocalc
- gftp
- gedit
Remote Access with VNC
The virtual network computing package permits a user to obtain
access to their X windows desktop over the Internet. This can be
very powerful if you find yourself in a mobile computing
situation. With the VNC package a user can run applications on
their desktop from a remote computer. The remote computer can be
running either Windows or Linux. Of course, there are some
limitations with this application. These limitations will be the
bandwidth of the network and what your X windows settings are. The
rule of thumb I always follow is to set the Xwindows settings to
capability of the remote system. For example, a 800x600 with 8 bit
color desktop setting will work better than 1024x768 with true color
setting. True color at 1024x768 would be nice but we must be
practical. How will you know the best configuration, test it!
- Install the VNC server, the VNC viewer and the tsclient packages
using the Add/Remove Software tool on your desktop.
- The previous step will install a script in the
/etc/rc.d/init.d/ directory. By default the installation of the
vnc-server package doesn't start at boot time. This could be
changed with the 'ntsysv' utility or following the Main Memu -->
System Setting --> Server Settings --> Services. For
security reasons, I don't have the 'vncserver' start on boot.
We'll follow this strategy too. This approach requires
the student to remotely access the host system and start the vncserver
and record the display number that is provided.
- Documentation for vnc user is available at www.realvnc.org.
- ssh into the host box using the account you intend to use in
vnc.
- Start vncserver by typing 'vncserver'
- Record the display number given to the vncserver session.
This will be something like Galileo.sinclair.edu:1. The :1 is the
display number and the host is Galileo.sinclair.edu. While at
Sinclair, you'll have to use the IP number instead of a hostname.
- From a new xterm window on the guest machine (this is the
remote machine where you are located), you'll need to enter a command
called vncviewer or find the menu entry that will start vnc.
- This command opens a window which will require you to provide
the IP address or the hostname and the display number.
- A vnc window will open with your remote desktop in it.
- If you want to assess your remote desktop through a browser,
enter the hostname or IP followed by a port number. The port
number will be 5800 + the display number. Once again for our
example this would be; http://Galileo:5801/. The hostname can be
replaced by the IP number.
- Well isn't that cool! Now why don't you play a bit.
- If you wanted to access your desktop from another operating
systems i.e. Windows, once the vncviewer was installed, one could
access their remote Linux desktop. Try accessing your remote box
from one of the Windows 98 machines in the room next door. How'd
that work?
- While you have a VNC session running on your system, download a
small file onto the host system through the remote session displayed on
your remote system.
- Now copy the file downloaded in the previous step using the scp
command.
- I'm sure Microsoft products can do that but what does it
cost? Nothing? I don't think so!!! If it comes with Windows
you still are paying for it.