Tuesday, February 16, 2016

ssh - common usage

Hi,

As I put the title of this post, I give simple examples to use it.

What is ssh:
 - ssh is the software utility to connect to remote host/machine(directly to the shell).
 - it supports when there is a 'sshd' service running in the remote machine only.
 - ssh is having so many methodologies to allow most of the clients based on some secure logging techniques.
 - Mostly we use ssh key pair(RSA)  to login to host.
 - SSH is used widely to secure the server from unknown logins even though a person knows the username/password to login.
 - with the help of keypair we use to secure the login.

Simple usage:
 - Generate key pair with below command using any ssh client.

 command: $ssh-keygen -t rsa -C "Some Name"

and while generating we can give password for shell login as an additional security if we want.

Process:
- Usually ssh-keygen generates a key pair (1-public key, 2-private key)
- We don't share the private key and we keep it with us in our machine.
- We will place the public key in the remote host (~/.ssh/authorized_keys).
- While logging to the host ssh client interacts with sshd server and verifies that this ssh client is valid or not based on these key pair match.
- If key pair is matched then only the sshd allows us to login to host.




No comments:

Post a Comment