Skip to content

Installation and configuration of openssh-server in ununtu12.04

September 26, 2013

                                            Open SSH stand for secure shell , it a strong tool for remote administration n data  transfer over a network using   by encryption  of data or command so that no eavesdropper can  attach the connection,  it is reliable and secure and most commonly  used in Linux world.

It works on secure shell protocols family and free available. OpenSSH provides a server daemon and client tools to facilitate secure, encrypted remote control and file transfer operations, effectively replacing the legacy tools

The server sshd always listen to client connection, a request arise sshd create a connection accordingly the request.

                   Installing and Configuring of Open Ssh

  1. Check your network connection
      • ifconfig -a

Note your IP address and if you have static IP Addressing try the following

  • dhclient OR
  • /etc/init.d/networking restart

2.  Update apt-gets package index and search for openssh server

      • apt-get update
      • apt-cache search openssh-server

Apt-cache is used get information from the ubuntu packages

3   Install openssh-server and verify after the installation

  • apt-get install openssh-server
  • ps -eaf | grep -v grep | grep sshd

It gives a some digits fallowed by ssh and also show the installed packages like “6733 sshd”

4    Starting Script for openssh-server

      • ls -l /etc/init.d/ssh

The startup script files are present in /etc/init.d/ssh.

Restarting the server with  with /etc/init.d/ssh and service command

  • cd /etc/init.d
  • ./ssh stop
  • ps -eaf | grep -v grep | grep sshd
  • ./ssh start
  • Service ssh status
  • Service ssh stop
  • Service ssh start

Now the installation is complete and makes sure the it’s working properly

Configuration of

1         Tacking backup of sshd configuration files

      • cp /etc/ssh/sshd_config        /etc/ssh/sshd_config.BKP
      • ls -l /etc/ssh/sshd_config*

2   opening the configuration files in your favorite editor I used Vim  and files I is present in                          etc/ssh/sshd_config file

  • vi /etc/ssh/sshd_config

Find the “permitEmptypassword” in configuration files after opening on vi editor, to do this press “/”  then  enter. Which get you to the search mood in vi editor and make sure “permitEmptypassowrd should be no”  and save the files, in vi editor used  :wq! To save the files

3   Restart the server

  •  Service ssh restart

4 creating  and killing of startup scripts for openssh-server and also verify it

      • update-rc.d ssh defaults

The update-rc.d is used to creating and killing of script for OpenSSH-server

To Verify startup and kill script was created

      • find /etc/rc*.d/* -print |        xargs ls -l | grep ssh
      • grep -v “#”        /etc/ssh/sshd_config | grep Permit
      • ps -eaf | grep -v        grep | grep sshd

which give all the created and killed script of  ssh


From → Linux

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: