ComputerSecurityStudent (CSS) [Login] [Join Now]

|UNIX >> SSH >> Current Page |Views: 16175

(How Install openssh-server [a.k.a sshd] in Ubuntu)

{ unbuntu, install openssh-server, apt-get, dpkg --get-selections }

7.0 Prerequisite
  1. Login to your TargetUbuntu02 VM, as username student
    • For those of you that are not part of this class, this should be another Unix/Linux server you also have access too.
  2. su - administrator
    • Or whatever account you have sudo access too.
  3. sudo su -
    • Now you are the root user.


7.1 Searching for openssh-server on TargetUbuntu02
  • First, please check if ssh is even installed.
    1. If you are not the root user, then you need to become root.
    2. dpkg --get-selections | grep ssh
      • dpkg - Is the package manager for Debian.
      • Notice openssh-client is listed, but openssh-server is not listed.
        • Meaning, you can ssh out, but nobody can ssh in because your sshd daemon is not running.


    3. ps -eaf | grep sshd | grep -v grep
      • "ps" - report a snapshot of the current processes.
      • "-eaf" - select all process with the (-ea) in full listing format with (-f).
      • "grep" -print lines matching the pattern (sshd)
      • "grep -v grep" - The "-v" option means ignore patterns matching grep.  What,,, you say?  Remember we just issued the "ps" command to see all the process, and I am want to ignore the grep process I issued looking for sshd.   


7.2 Installing openssh-server on TargetUbuntu02
  • First Let's Update the Debian Package Manager Database


    1. On TargetUbuntu02, Make sure you are user root!!!


    2. apt-get update
      • The update option is used to resynchronize the package index files from their sources.


    3. apt-get install openssh-server
      • The above command installs openssh-server (a.k.a, sshd).


    4. ps -eaf | grep sshd | grep -v grep
      • Not to be redundant, but we are asking the "ps" command to show in full listing, all the system, in which we are ignoring our grep process.
      • Notice the sshd daemon process is running.

Proof of Lab
  1. Cut and Paste a screen shot that look similar to Step #4 in Section 7.2 into a word document and upload to Moodle.







Help ComputerSecurityStudent
pay for continued research,
resources & bandwidth