Setting up and Installing SSH2
SSH is a basically an encrypted telnet client. It is a very good program to use
to help protect and secure any computer. SSH2 is the latest version of Secure
Shell program that is very versatile offering many different incryption standards.
Including 3DES, Blowfish, TwoFish, IDEA and others. It also has Secure File Copy
(SFC) and Secure File Transfer Protocol (SFTP). This tutorial covers just the
basic setup of SSH2 and not SFC and SFTP.
To Setup SSH2 on RedHat Linux follow these easy steps…
1. Go to www.ssh.com and check out the documentation.
2. Get the latest Version with the tar.gz extension. Save this in your Home directory.
3. I download this using ncftp which comes with almost all linux distributions. Using
the following commands I login to the ftp server and download the file.
Aphid:/home/striker> ncftp
Ncftp> open ftp.ssh.com
Ncftp / > cd /pub/ssh/
Ncftp /pub/ssh> get ssh-2.2.0.tar.gz
When it is finished downloading say goodbye to the ftp server like this.
Ncftp /pub/ssh> bye
If ncftp asks you to save a bookmark tell it no.
4. I copy this to the /usr directory and check the file using the file command. Like this…
Aphid:/home/striker> mv ssh-2.2.0.tar.gz /usr/
Aphid:/home/striker> cd /usr
Aphid:/usr> file ssh-2.2.0.tar.gz
Which should return this:
ssh-2.2.0.tar.gz: gzip compressed data, deflated, original filename, last modified:
Mon Jun 12 23:42:29 2000, max compression, os: Unix
5. Now you need to unzip it using GUNZip. Like this…
Aphid:/usr> gunzip ssh-2.2.0.tar.gz
You should notice that the file has been renamed to ssh-2.2.0.tar
6. Now if you run the file command on the new file. This is what you should get…
Aphid:/usr> file ssh-2.2.0.tar.gz
ssh-2.2.0.tar: GNU tar archive
7. We need to untar the file using the tar command.
Aphid:/usr> tar -xvf ssh-2.2.0.tar.gz
You should see a bunch of files scroll by as the file is extracted into the directory it will create.
8. Change to the SSH2 Directory.
Aphid:/usr> cd ssh-2.2.0
9. Read the ReadMe file using the "less" Program that comes with Linux (Notice the Capital letters in the command below).
Aphid:/usr/ssh-2.2.0> less README
10. Use the arrow keys to scroll up and down and and hit q to quit out of less.
11. Change user to root by just typing su and then entering the root password when it asks for it.
12. Run the configuration program like this…
Aphid:/usr/ssh-2.2.0> ./configure
13. This will configure ssh to your system. Next build SSH2 like this…
Aphid:/usr/ssh-2.2.0> make
14. Now we need to Install it like this...
Aphid:/usr/ssh-2.2.0> make install
15. This will install SSH2 on your system.
16. Now we need to configure it for each user.
17. Run the SSH KeyGen Script as the user.
Aphid:/usr/ssh-2.2.0> /usr/local/bin/ssh-keygen
18. This will ask for the users password.
19. Now we need to create the Identification file using your favorite text editor. I'm going to use pico in this example.
Aphid:/usr/ssh-2.2.0> pico /home/<user's name>/.ssh2/identification
Add the following lines to this file.
# indentification
IdKey id_dsa_1024_a
Save the file and exit (Using pico Ctrl-X and press Y to save and press enter to confirm the file name.
20. Next we need to create the Authorization file.
Aphid:/usr/ssh-2.2.0> pico /home/<user's name>/.ssh2/authorization
Add the following lines to the file.
# authorization
Key id_dsa_1024_a.pub
Save the file and exit.
21. Repeat these last steps (17-20) to configure more clients (you must be logged in as each user to configure them).
22. We don't have to configure the server any special way (you can look at the server configuration file located in
/etc/ssh2/sshd2_config
23. To setup the server to start automatically on boot add the following line to the top of your /etc/rc.d/rc.local file
/usr/local/sbin/sshd2
Save the file and reboot.
26. Run the following command to see if SSH2d is running...
aphid:/home/striker> ps -ax | grep ssh
25. To test the setup try this...
aphid:/home/striker> /usr/local/bin/ssh2 -l 127.0.0.1
(The loopback address on every computer. Enter the host name or IP Address of the computer that you wish to connect to.).
SSH2 should ask for the password of the user that you are connecting as and then drop you to a console on the your machine. To close your SSH connection type exit.
That's it you are done. SSH is setup and configured for your computer!
By Brad Davis