Quantcast
Channel: linux – Logisek Security Blog
Viewing all articles
Browse latest Browse all 54

OpenSSH server installation

$
0
0

To install the OpenSSH server application on your Ubuntu server system:

Installation

sudo apt-get install openssh-server

Backup original configuration file

sudo cp / etc/ssh/sshd_config / etc/ssh/sshd_config.original
sudo chmod a-w / etc/ssh/sshd_config.original

Generate SSH keys
During the process you will be prompted for a password. Simply hit Enter when prompted to create the key.

ssh-keygen -t rsa

By default the public key is saved in the file ~/.ssh/id_rsa.pub, while ~/.ssh/id_rsa is the private key.

Copy id_rsa.pub file to the remote host
Copy the id_rsa.pub file to the remote host and append it to ~/.ssh/authorized_keys by entering:

ssh-copy-id username@remotehost

Permissions

chmod 600 .ssh/authorized_keys

For more please visit ubuntu.


Viewing all articles
Browse latest Browse all 54

Trending Articles