Chat with us, powered by LiveChat
SSH connection using public key.

This day I would like to share a very useful procedure, which has helped me a lot with
the work I do on daily basis. In my case, one of the most recurring tasks I do to manage
MIDDLEWARE components is to connect via SSH to UNIX servers, so I will detail
below the procedure that we could use to connect via SSH using a public key. This
could also be useful when there are platforms that have more than 1 server and you
need to be making connections to perform some action.


1) Initially a set of asymmetric encryption keys will be generated:


 
 

2) Next you will request a PASSPHRASE which we will leave blank for this occasion:


 

 

3) Once the key set is generated,we enter the ~ / .ssh directory in which we will find the
keys:


 
 

4) We will proceed with the copy of the public key to the server or equipment that will
not be authenticating via PASSWORD:


 

5) Once we finish moving the public key to the destination, we will connect to the remote
computer:


 

6) We will enter the new public key to the list of authorized keys:


 

7) We test the SSH connection:


 
 
 

NOTE 1: If we want to have additional security we will use a complex PASSPHRASE for
the private part of our key. In order not to have to write this PASSPHRASE every time
we identify we can use the ssh-agent program.

NOTE 2: Our keys can be compromised if someone has physical access to our
computer and manages to copy the key files. They can also be compromised if a
malicious user takes advantage of an operating system security flaw to obtain
administrator privileges and obtain the key files. Therefore, we must weigh the risks and
advantages of automatic identification, and make the decision that suits us.

 

Written By GuChe

This day I would like to share a very useful procedure, which has helped me a lot with
the work I do on daily basis. In my case, one of the most recurring tasks I do to manage
MIDDLEWARE components is to connect via SSH to UNIX servers, so I will detail
below the procedure that we could use to connect via SSH using a public key. This
could also be useful when there are platforms that have more than 1 server and you
need to be making connections to perform some action.

Comments are closed.