Many of us have got up the answer as "ssh is secure shell" . But when it comes to the realistic question - why ssh is required ? you get stuck with different answers. Don't worry you will get to know till the end to this blog.
Ssh is a protocol (meaning - a set of rules) which helps you to transfer the data between systems/machines in a very secure manner without any security breach.It has replaced at least 4 main protocols - telnet,ftp,vnc (partly), vpn (partly).With the encrypted keys mechanism,ssh helps you to securely login to other machines. These keys are public and private keys .
Now lets come back to the why part , why we need it ? So.. the outstanding capability of encrypting and transferring the data makes SSH - the developers or administrators first choice to use.You need to connect to other machine ! - use ssh , but how ? check it ..
1. Generate a key using ssh-keygen command , this command will generate a public and private key .
2. Copy the public key to all machines that you want to ssh or transfer the data:
[hdp@nn1 ~]$ cat id_rsa.pub | ssh username@machine 'cat >> .ssh/authorized_keys'
For-example : username is 'hdp' and machine is 192.168.1.10, So your command will be :
cat id_rsa.pub | ssh hdp@192.168.1.10 'cat >> .ssh/authorized_keys'
- id_rsa.pub - Thus is a public key file which is encrypted , it will be copied to other machines , this key is a available in .ssh location
- id.rsa - This is a private encrypted key file
- authorized_keys - This File is copied to the machines to which you want to connect or transfer the data securely .
3. Now , last step is ssh to the machine you want to connect :
So , you can check in 3rd step that on ssh 192.168.1.10 (machine host-name) , it is successfully login us to the another machine .
No comments:
Post a Comment