Important/warning!
This lab is heavily under construction, It will undergo major changes until this warning is removed.
Objectives
- To set up, configure Secure Shell Services (ssh/sshd)
- To use the ssh, scp, and sftp clients to access another host securely
- Use ssh to tunnel X applications
- Use ssh to tunnel other traffic
- To customize sshd to create a more private, secure system
Reference
- man pages for ssh, ssh-keygen, sshd_config, ssh_config, scp, netstat, sftp, ifconfig, ping, arp, netstat, service
- A good ssh tutorial
- A good HOW-TO to make ssh more secure
Required materials
- Fedora 12 Live CD or a classmate on the same pod
- One SATA hard disk in a removable drive tray with Fedora host and 3 Fedora Virtual Machines installed
- Completion of Lab 6
Lab Preparation
Update your systems
It is advisable to perform a yum update
on your Fedora host and all 3 VM's.
Backup your VMs before proceeding
If you did not do it at the end of Lab 6, stop all of your VMs and backup your VM disk images.
Lab Investigations
Investigation 1: How do you enable the sshd service.
Note!
Complete the following steps on your fedora host and all 3 VM's.
- OpenSSH should have been installed by default. Lets confirm this by issuing the command:
- You should see a number of packages installed including
openssh-clients
and openssh-server
-
openssh-server<code> installs a service called <code>sshd
, confirm this service is running by issuing the command:
- Now check that the sshd service is configured to start for runlevels 2, 3, 4, & 5, by issuing the command:
- If the service is not configured correctly fix it by issuing the command:
-
chkconfig --level 2345 sshd on
- Now that you know the service is running investigate what port number and protocol sshd uses by issuing the command:
- What protocol and port is the sshd process using?
- What is the state of the port?
- Why do UDP ports not have a state?
- Reissue the
netstat
command without the n
option.
- What is the difference?
- The
n
option tells netstat to list everything with numerical values, without it netstat resolves IP addresses and port numbers to host names and protocol names using the files /etc/hosts
and /etc/services
-
netstat
is a very useful command for anything to do with networking. Read its man page and make sure you understand its output.