80 likes | 88 Views
By default, SSH login requires password authentication. Sometimes you want to login without SSH password. Here is how to setup SSH passwordless login.<br><br>Visit https://fedingo.com/how-to-setup-ssh-passwordless-login/<br>#ssh #password #login #linux
E N D
Look for existing SSH keys Open terminal and run the following command to check if there are any existing SSH keys in your system. $ ls -al ~/.ssh/id_*.pub
Generate new SSH key pair Run the following command to generate an SSH key pair. Replace email@domain.com with the email address of your website administrator. $ sudo ssh-keygen -t rsa -b 4096 -C "email@domain.com"
Copy Public Key Next, you need to copy your new public key to the server you want to manage. You can do this using ssh-copy-id command. $ ssh-copy-id remote_user@server_ip
Login to remote server Run the following command to login to your remote server. $ sudo ssh remote_user@server_ip
Disable Password Authentication After you login to remote server using public keys, open the following file. $ sudo vi /etc/ssh/sshd_config Look for the following lines and modify them such that their values are ‘no’. PasswordAuthentication no ChallengeResponseAuthentication no UsePAM no
Restart SSH service Ubuntu/Debian $ sudo systemctl restart ssh Redhat/Fedora/CentOS $ sudo systemctl restart sshd
Thank You Visit for details https://fedingo.com/how-to-setup-ssh-passwordless-login/