'' This article is published using Lamento🍋
Using terminal we are going to establish a remote connection to a Remote Server like (Droplet, E2C or any cloud vm).
If you are using Linux or Mac you are good to go but in windows you should download git-bash.
1) Now to generate your SSH key type his commends in your terminal.
It's better to generate SSH keys inside
.ssh
folder
ssh-keygen
2) Now name your key
you can name your key what ever suits for you
3) Don't need any passphrase
We have generated two files public key & private key
public key - Used by the Server
private key - Used by the Client
4) Open the public key files
cat ur-key-name.pub
We need to provide our public key to the remote server by opening it in terminal and copy the phrase.
5) To establish connection between client with server
ssh -i ./droplet-ssh-key root@157.245.104.56
Abbreviation: ssh -i keyfile target_machineusername@host
By providing the private keyfile and our server username and ip address we are opening a connection between client and server
If you see the above message we have successfully connected our client with the server
Bonus
You can check your system specification with this commends
free -h
df -h
lscpu
To terminate the session enter exit
in terminal.
Top comments (0)