Monday, June 30, 2014

Create and Setup SSH Certificates


What is SSH ?

Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers. It connects, via a secure channel over an insecure network, a server and a client running SSH server and SSH client programs, respectively. The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.

Source Wikipedia : http://en.wikipedia.org/wiki/Secure_Shell

Now that we know what ssh is and why it is used ,lets setup ssh for Ubuntu.

At the terminal type

$ sudo apt-get install openssh-server

Accept to install by typing Y when requested.

$ cd

$ ssh-keygen -t rsa

Hit enter twice and .ssh folder will be created.

$ cd .ssh

Copy id_rsa.pub to authorized_keys file.

$ cp id_rsa.pub authorized_keys

Test the keys by ssh to localhost

$ ssh localhost

Now go back to .ssh directory

$ cd ~/.ssh

Now we  can sse that a new file known_hosts has been automatically created.

No comments:

Post a Comment