SSH or Secure Shell is network protocol that allows users to connect with remote server using command line. To login with SSH, you can either use remote server password or you can use SSH keys which doesn't require to input password on connection.
To connect with remote server, first you need to generate SSH keys in your local system. Then you need to upload keys in your account in provider.
Run the below OpenSSH command to generate SHA256 RSA key pair in your local system.
ssh-keygen
This will ask you to select the location where you want to generate keys. The default path is ~/.ssh. SSH automatically check the keys at this location so it is advised to keep default location.
Then it will ask to enter and confirm passphrase. You can simply press enter to keep passphrase empty.
Once you press the Enter SSH keys will be generated on the selected. The below out
You can see ~/.ssh directory generated. In this directory id_rsa is private key, id_rsa.pub is your Public key and known_hosts with string.
Now you need to add your SSH public key in your account. You can add it through your providers account portal. For example, if you are using Digital Ocean server, then you can find option in Settings > Securiry.
When you click Add SSH Key, it will ask to input public key.
Paste the public key from /home/user/.ssh/id_rsa.pub and save it. Now connect with your remote server using ssh command.
ssh [email protected]
If everything goes right, you will connected with remote server without asking for password.
Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]
Laravel 8 - CRUD application tutorial with Example
In this article, i will share with you h...How to convert a string to lowercase in PHP
Use the PHP strtolower() funct...Angular Advance Interview Questions 2021
Angular is a very popular name among web...How to send mail using mailtrap in laravel 7
Hey Artisan Hope you are doing...Laravel 8 Default Password Validation Rules
Password is the most important data in a...