How to Login without Password in Linux

Share it:

Secure Shell (SSH) an open source and most commonly used network protocol by all for remote login on servers.

SSH was a replacement for Telnet and other unsecured remote shell protocols such as rlogin, rsh and rexec and it is mainly used for many applications across many platforms including Linux, MacOS, Solaris and BSD

Also using the SCP protocol files can be transferred from one computer to another
In this tutorial I will show you how to setup a passwordless login to the remote server, this document can be used on all Linux operating systems (ie) Ubuntu, LinuxMint, Fedora, Redhat, CentOS and FreeBSD
  • Server 1: Ubuntu 16.04
  • Server 2: LinuxMint 17

Setup SSH Login without password

Step 1: Create Keys using ssh-keygen

Here i am creating the authentication keys on Ubuntu server

Step 2: Create ssh directory on the target server
$ ssh [email protected] mkdir -p .ssh
[email protected]'s password:

Step 3: Append the newly created public key to the target server's authorized key file

$ cat .ssh/ | ssh [email protected] 'cat >> .ssh/authorized_keys'
[email protected]'s password:

Step 4: Test the login and change the .ssh folder's permission to 700
$ ssh [email protected]
Welcome to Linux Mint 17.3 Rosa (GNU/Linux 3.19.0-32-generic x86_64)

Welcome to Linux Mint
 * Documentation:
Last login: Tue May  2 11:07:57 2017 from
[email protected] ~ $
Share it:

Post A Comment: