OpenSSH

Installation

Secure shell is an encrypted network protocol that allow remote login securly. If you have no idea what Secure Shell is, read this before we start.

Normally the client and server are installed by default. If not it suffices to run:

$ sudo apt-get update
$ sudo apt-get install openssh-client openssh-server

Simple Configuration

The main configuration files are in the directory /etc/ssh:

ssh_config : client configuration file sshd_config : server configuration file

We will only cover the server configuration in this manual.

  • Open /ect/ssh/sshd_config for editing.

    $ sudo vim /etc/ssh/sshd_config
    
  • For security, change the listening port instead of default TCP port 22 as such:

    Port 10022
    
  • Ensure that PermitRootLogin is set to no in sshd_config (we use sudo-user only):

    PermitRootLogin no
    
  • Start your SSH service.

    $ sudo /etc/init.d/ssh start
    

NOTE: After any configuration, always restart server to apply your changes.

$ sudo /etc/init.d/ssh restart

results matching ""

    No results matching ""