Technical Stuff

Start from basics

Passwordless Authentication in Linux

Passwordless Authentication in Linux
Passwordless Authentication in Linux
5 (100%) 3 votes

Hi Everyone! Today, we are discussing regarding enabling password less authentication in Linux.

So, Let’s begin with the basic concepts.

What is SSH?

SSH stands for Secure shell. SSH is used for secure connection between client and server using cryptography authentication mechanism. The two most popular mechanisms in SSH are password-based authentication and password less authentication which is also called as public key based authentication.


Now, done with the basics. Let’s begin

To set up a password less SSH login in Linux all you need to do is to generate a public key and add it to the remote hosts.

File./.ssh/authorized key file

The following are the steps for configuring password less SSH login:

Step1: Check if there is any existing SSH key pair.

Before generating a new SSH key pair first check if you already have an SSH key on your client machine.

Command: ls -al ./.ssh/id_*.pub

Step 2: Generate New SSH key pair

We are going to generate 4096 bit SSH Key Pair with email id.

Command: ssh keygen -t rsa -b 4096 -C “Email_id”

Press ENTER to accept the default file location and file name.

Next, the ssh-keygen tool will ask you to type a secure passphrase. Whether you want to use passphrase it’s up to you, if you choose to use passphrase you will get an extra layer of security. In most cases, developers and system administrators use SSH without a passphrase because they are useful for fully automated processes. If you don’t want to use passphrase just press ENTER.

To be sure that the SSH keys are generated you can list your new private and public keys with:

Command: ls -al ./.ssh/id_*

Step 3: Copy public key.

As now, public key is generated. Now copy the authentication key to the server which you want to manage password less.

Command: scp-copy-id [email protected]_ip_address

remote_username - Server which must be managed password less.

So, Now you can login to the server password less.

You can also test using below command.

Command: ssh [email protected]@server_ip_address

So, the above steps helps you to enable passwordless authentication.

Do let me know, how you find the blog. Was it helpful to you? So, if you like the blog. Do subscribe to get notified…!!!

Thank You!
Happy Learning !!!

If you have doubt or queries, you can comment us or can mail us on [email protected]

If you have any Recommendation for future blog, you can email us on [email protected]

Follow Us on :

Top Searches:

  1. Top Linux Commands
  2. Introduction to linux.
  3. Websphere hack
  4. My Story – Jboss Hardening
  5. Installation and configuration of Apache 2.2 on Linux
  6. DB Auto Re-connect.
  7. Redirection in Jboss.
  8. SSL Implementation in Jboss
  9. Best SSL Guide.
  10. Types of SSL.
  11. Best Jboss Server Security Guide.
  12. Introduction to hardening in Middleware.
  13. Hardening In Jboss EAP 5.1
  14. Enable TLS1.2 in Jboss EAP 7



Leave a Reply

%d bloggers like this: