- Kali Linux Tutorial
- Kali Linux - Home
- Installation & Configuration
- Information Gathering Tools
- Vulnerability Analyses Tools
- Kali Linux - Wireless Attacks
- Website Penetration Testing
- Kali Linux - Exploitation Tools
- Kali Linux - Forensics Tools
- Kali Linux - Social Engineering
- Kali Linux - Stressing Tools
- Kali Linux - Sniffing & Spoofing
- Kali Linux - Password Cracking Tools
- Kali Linux - Maintaining Access
- Kali Linux - Reverse Engineering
- Kali Linux - Reporting Tools
- Kali Linux Useful Resources
- Kali Linux - Quick Guide
- Kali Linux - Useful Resources
- Kali Linux - Discussion
How To Setup SSH Access Without Password
In this article, we will allow you to configure a password-less login for Linux system with SSH keys to connect to a remote Linux server without entering a password which will also increase the trust between two Linux servers for easy file transfer.
SSH is an open source and trusted network protocol that is used to login into remote servers for executing of commands and programs. This is also used to transfer files from one computer to another computer over the network using secure copy (SCP).
Creating SSH Keys
# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 71:de:c6:b4:c4:8b:31:70:5f:bd:96:60:56:8e:74:b9 root@centos The key's randomart image is: +--[ RSA 2048]----+ | . . .o+. | | o o.=+.. | | . + B...+| | + O o E | | S o * . | | . | | | | | | | +-----------------+
For security, the key itself is protected using a strong passphrase, if a passphrase is used to protect the key, the SSH-agent can be used to cache the passphrase.
Copying the SSH-Key to the Remote Host
ssh-copy-id firstname.lastname@example.org email@example.com's password: Now try logging into the machine, with "ssh 'firstname.lastname@example.org'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting.
Verifying the Login Without Password
ssh email@example.com Last login: Thu Apr 14 17:30:19 2016 from 192.168.2.225 #
Now on words, we are able to login to the remote server without any password
By configuring the above 3 steps we will be able to login to the remote server without entering the password, which is a most security problem that someone might see the password and hack the server these types of authentication will help us to write automatic backups to run and schedule on the remote server.
- Related Articles
- Access to the Password Database in Python
- Access to the Shadow Password Database in Python
- How to setup user access limitation on a timely basis in SAP HANA
- How to install python modules without root access?
- getpass() and getuser() in Python (Password without echo)
- How to connect to SSH using PowerShell?
- Resetting a Root Password in Linux without External Media
- How To Configure and Secure SFTP Without Providing Shell Access on CentOS 7
- How To Configure and Secure SFTP Without Providing Shell Access on Ubuntu 16.04
- How to setup MongoDB Java environment?
- How to setup Video.js with AngularJS?
- How to setup Video.js with ReactJS?
- How to setup Video.js with Vue.js?
- How to setup firewall in Linux?
- How to setup sendmail in ubuntu