Renaming .ssh/authorized_keys2 as .ssh/authorized_keys fixed the problem. share|improve this answer edited Feb 26 at 14:26 muru 71.6k13130182 answered Mar 7 '12 at 12:56 xeyes 44132 Thank's! Password Linux - Software This forum is for Software issues. The permissions are set - for testing - to 777. http://philgiebler.com/for-password/ssh-rsa-authorized-keys-not-working.html
So we had to go one step further. Why the need for recursive? –joachim Mar 23 '12 at 10:23 4 This answer may not have helped the original poster, but it definitely fixed my problem when I googled and this resolved all my problems. –Afaria Jun 21 at 18:37 yup.
you should use ssh-copy-id -i path/to/key_name.pub [email protected]_name 3. Chu Yeow April 7th, 2007 at 12pm I didn't mention this in the post, but I had a group-writable home directory because we were using this particular user account as a You must execute the command each time you log in to a virtual console or a terminal window. 22.214.171.124. Multiple required methods of authentication for sshd For higher security, SSH can require Ssh Asking For Password Everytime how to maintain 700 GB SQL server database?
i spent hours searching for a solution... Ssh No Password Prompt Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap - Main Menu Linux Forum Android Forum Chrome OS Forum Search LQ Would you like to answer one of these unanswered questions instead? Also, on both devices I added this to /etc/ssh/sshd_config: RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile /.ssh/authorized_keys Does anyone know what might be the problem here?
So if you have OpenSSH v7.0+, make sure your key is not ssh-dss. Authentication Refused: Bad Ownership Or Modes For Directory To create your public and private SSH keys on the command-line: mkdir ~/.ssh chmod 700 ~/.ssh ssh-keygen -t rsaYou will be prompted for a location to save the keys, and a Your home directory should be writable only by you This was it! E o | | o..o S | |.
There is a setting AuthorizedKeysFile .ssh/authorized_keys This is a real bad bug because you look at it and you think it is OK. http://www.linuxquestions.org/questions/linux-software-2/passwordless-ssh-setup-not-working-any-ideas-559628/ Then you can go hunt the bad permissions. Passwordless Ssh Not Working Linux That's also not a cool way. Ssh Asking For Password When It Shouldn't Of all reasons, my user wasn't allowed to log in because the shell specified by ansible (/bin/zsh) on user creation didn't exist.
An alternate, and probably more secure fix is to check the permissions on your home directory - if it is not writable by anyone but the owner, then it should not news Thank you so much. –GTRONICK Aug 5 '15 at 20:48 Man thanks! We have done this kind of thing many times before and truly believe the ssh set up to be a real pain. The key was approximately two lines long instead of four. Authorized_keys File
This will solve your problem almost for sure, it did solve mine :-) elkali View Public Profile View LQ Blog View Review Entries View HCL Entries Find More Posts by the two terminals are same width so it's hard to figure out until I turned on the line numbers to see two lines in the authorized_keys file. –Shawn Apr 22 '15 option to see what is happening) If server still asks for password then you gave smth. have a peek at these guys If you are not willing to do that, then still follow this guide, but also check the bullet point below.
Last edited by doc.nice; 05-12-2009 at 03:41 PM. Ssh Force Prompt For Password Both of these were considered state-of-the-art algorithms when SSH was invented, but DSA has come to be seen as less secure in recent years. That extra time should be enough to log in to any computers you have an account on, delete your old key from the .ssh/authorized_keys file, and add a new key.
share|improve this answer edited Jun 13 '13 at 21:19 answered Jun 13 '13 at 20:15 belacqua 13.2k136595 I'm a newbie - what logfiles should I check (on which machine)? Here's how you should go about debugging your SSH public key authentication woes: Getting more debug info when connecting with your ssh client: Add a ‘-v' option to your ssh command Why isn't it logging me in without a password? We Did Not Send A Packet, Disable Method In our example we wil create a keypair using dsa encryption.
Inconsistent size of parentheses in Latin Modern and Computer Modern Do n and n^3 have the same set of digits? The authorized_keys file should have 644 permissions and be owned by the user. to Enter passphrase: when you've created keys ( so it's normal) if ssh is not listening default port 22 must use ssh -p port_nr -- SERVER ----- 4. http://philgiebler.com/for-password/ssh-authorized-keys-not-working-password.html I thought all the permissions were correct, but it's important to remember that /home/USER must be 700 or 755 –Rob Jan 25 '13 at 19:22 2 Also remember to check
This should be done on the client. This will generate both a private and a public key. Move the authorized_keys file into it. If you'd post that as an answer, I'd accept it. –Thom Apr 17 '12 at 9:08 add a comment| up vote 2 down vote Ensure that AuthorizedKeysFile points to the right
What I would suggest is turning on ssh debugging. Someone was saying to change the permission of .ssh folder from root. Here I tried an alternate, I hope it may help someone. If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
In case anyone has the same problem. When you do that, /var/log/secure shows that sshd is looking for //.ssh/authorized_keys. Create the key pair; put public key in the remote box's ~/.ssh/authorized_keys2 file. Visit the following links: Site Howto | Site FAQ | Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us.
Regards, Alunduil alunduil View Public Profile View LQ Blog View Review Entries View HCL Entries View LQ Wiki Contributions Visit alunduil's homepage! check that and add more info. –maniat1k Mar 7 '12 at 12:42 askubuntu.com/questions/307881/… –Vineet Nov 11 at 11:56 add a comment| 10 Answers 10 active oldest votes up vote Note that if you protect your key with a passphrase, then when you type the passphrase to unlock it, your local computer will generally leave the key unlocked for a time. UNIX is a registered trademark of The Open Group.
glad i decided to read the next answer down –Katushai Aug 21 at 7:44 add a comment| up vote 4 down vote There are different ways to solve this: you can more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed and it works fine when I'm running sshd -d, but fails once I actually run service sshd start.