ComputerSecurityStudent (CSS) [Login] [Join Now]




|UNIX >> BackTrack >> BackTrack 5 R1 >> Current Page |Views: 17326

(BackTrack: Lesson 8)

{ Configuring the SSH Server }


Section 0. Background Information
  1. What is SSH?
    • Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively).

  2. Pre-Requisite
  3. Lab Notes
    • In this lab we will do the following:
      1. Configure the SSH Server
      2. Start Up the SSH Server
     
  4. Legal Disclaimer
    • As a condition of your use of this Web site, you warrant to computersecuritystudent.com that you will not use this Web site for any purpose that is unlawful or that is prohibited by these terms, conditions, and notices.
    • In accordance with UCC § 2-316, this product is provided with "no warranties, either express or implied." The information contained is provided "as-is", with "no guarantee of merchantability."
    • In addition, this is a teaching website that does not condone malicious behavior of any kind.
    • Your are on notice, that continuing and/or using this lab outside your "own" test environment is considered malicious and is against the law.
    • © 2013 No content replication of any kind is allowed without express written permission.
Section 1: Log into BackTrack5
  1. Start Up VMWare Player
    • Instructions:
      1. Click the Start Button
      2. Type Vmplayer in the search box
      3. Click on Vmplayer

     

  2. Open a Virtual Machine
    • Instructions:
      1. Click on Open a Virtual Machine

     

  3. Open the BackTrack5R1 VM
    • Instructions:
      1. Navigate to where the BackTrack5R1 VM is located
      2. Click on on the BackTrack5R1 VM
      3. Click on the Open Button

     

  4. Edit the BackTrack5R1 VM
    • Instructions:
      1. Select BackTrack5R1 VM
      2. Click Edit virtual machine settings

     

  5. Edit Virtual Machine Settings
    • Instructions:
      1. Click on Network Adapter
      2. Click on the Bridged Radio button
      3. Click on the OK Button

     

  6. Play the BackTrack5R1 VM
    • Instructions:
      1. Click on the BackTrack5R1 VM
      2. Click on Play virtual machine

     

  7. Login to BackTrack
    • Instructions:
      1. Login: root
      2. Password: toor or <whatever you changed it to>.

     

  8. Bring up the GNOME
    • Instructions:
      1. Type startx

     

  9. Start up a terminal window
    • Instructions:
      1. Click on the Terminal Window

     

  10. Obtain the IP Address
    • Instructions:
      1. ifconfig -a
    • Note(FYI):
      • My IP address 192.168.1.111.
      • In your case, it will probably be different.

     

Section 3: Try Starting the SSH Server
  1. Check for SSH Server Process
    • Instructions:
      1. ps -eaf | grep sshd | grep -v grep | wc -l
    • Note(FYI):
      • ps -eaf: Show me all the processes.
      • grep ssh: Show me only sshd process.
      • grep -v grep: Don't show me my own grep process.
      • wc -l: Count the number of lines (i.e., processes) returned.
      • IF 0 is returned, THEN continue to next step.
      • IF the number is greater than 0, THEN continue to next section.

     

  2. Try Starting the SSH Server
    • Instructions:
      1. /etc/init.d/ssh start
      2. ps -eaf | grep sshd | grep -v grep
      3. ssh student@localhost
    • Note(FYI):
      • For Step 2.1, the rsa and dsa host keys will probably not be generated.
      • If Step 2.3, you will probably get a Connection reset by peer, since the host keys are not generated.
      • If you did not receive the message from Step 2.1 and 2.3, then your ssh server is configured correctly and there is no reason to continue.

     

  3. Stop the SSH Server
    • Instructions:
      1. /etc/init.d/ssh stop

     

  4. Create RSA Host Key
    • Instructions:
      1. ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
      2. Press <Enter>
      3. Press <Enter>

     

  5. Create DSA Host Key
    • Instructions:
      1. ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
      2. Press <Enter>
      3. Press <Enter>

     

  6. Start the SSH Server
    • Instructions:
      1. /etc/init.d/ssh start
      2. ps -eaf | grep sshd | grep -v grep
      3. ssh student@localhost
      4. yes
      5. Press <Ctrl> and c

     

Section 4: Proof of Lab
  1. Proof of Lab
    • Instructions:
      1. ps -eaf | grep sshd | grep -v grep
      2. netstat -nao | grep ":22"
      3. ls -l /root/.ssh/known_hosts
      4. date
      5. echo "Your Name"
        • This should be your actual name.
        • e.g., echo "John Gray"
    • Proof of Lab Instructions:
      1. Do a PrtScn
      2. Paste into a word document
      3. Upload to Moodle.

     

 



Help ComputerSecurityStudent
pay for continued research,
resources & bandwidth