SSH not working after ssh-keygen due to lack of entropy
Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
SSH not working after ssh-keygen due to lack of entropy
My /proc/sys/kernel/random/entropy_avail went from 2200 to <200 after ssh-keygen. The generated key pairs also doesn't work (ie I'm asked to provide a password). Anyone knows what is the minimum before and after entropy number I should see in order to have the keys generated properly?
I run badblocks twice just to increase the entropy level and generated the key pair again, yet failed again. This was going from my Physical Box A to my VM Box B.
I then tried generating the key pair on Physical Box C and put the public key on Physical Box A. I then ssh from Physical Box C to Physical Box A and it worked fine. This proves my procedure was correct.
Unfortunately the original key pair generated on VM Box B was removed. Nevertheless, I did "ssh -vv username@<VM Box B>" from Physical Box A, and I saw the following at the end:
Code:
debug1: Next authentication method: publickey
debug1: Trying private key: /home/backup/.ssh/identity
debug1: Trying private key: /home/backup/.ssh/id_rsa
debug1: read PEM private key done: type RSA
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Trying private key: /home/backup/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
Are ~/.ssh and all files in it on the client only readable and writable by you (chmod 0700)? Is PubkeyAuthentication set to yes in /etc/ssh/sshd_config on the server and have you restarted sshd?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.