Asked 10 years, 7 months ago. Active 4 months ago. Viewed k times. I have followed the instructions for changing permissions: Below is the result if I do ssh -v localhost. Why isn't it logging me in without a password? Improve this question. Peter Mortensen Here's a solution: bugs. Add a comment. Active Oldest Votes. Improve this answer. Michael Teddy Teddy 18k 2 2 gold badges 29 29 silver badges 42 42 bronze badges. Well something in the above worked, though isn't "chmod -R go-wrx foobar" rather dramatic?
Why the need for recursive? For the second part, it's not neccesary to make it recursive, just doing the chmod go-wrx foobar is enough. Doing it recursively could seriously bone some applications if you have some group or other access to files, especially if it's a web directory.
Thus, permissions can be as 'open' as for both directories, if you're so inclined. Show 12 more comments. Cole Stanfield Cole Stanfield 2, 1 1 gold badge 17 17 silver badges 12 12 bronze badges. The restorecon is what you need after you have copied the files by hand, e.
You should probably run it on all files in this case. Could fix other odd problems. Another happy camper here. This was my problem in RHEL 6. Fixed for me on fedora 35 when migrating home to another hdd — MeetTitan. Note that "just 4 security" is not just for security!
SSH will ignore the file if it does not have restrictive permissions. Ensuring ownership would be a great addition to this list — steviesh. I had no idea about ssh-copy-id! That step alone would make a great answer. SSH does not pickup any files in ". Thanks a lot! Show 1 more comment. Stephan Hoyer Stephan Hoyer 4, 2 2 gold badges 28 28 silver badges 25 25 bronze badges. A wide variety of authentication mechanisms are supported. This indicates that authentication has failed and can be caused by a number of issues.
Here are some steps you can take to troubleshoot this issue:. This login method uses cryptographic keys to authenticate a user. You can enable password authentication in the SSH service configuration file once you successfully log in with your SSH key. Many of the most common issues regarding key-based authentication are caused by incorrect file permissions or ownership.
If you cannot recover access to the console, this could indicate issues with the file system used for authentication or configuration issues within the PAM subsystem. This would also impact attempts to reset the root password and log in through the console. You must re-enter the current password. Finally, enter a passphrase to secure the key.
Press Enter and confirm the passphrase once more when requested. The password is required any time you use the key for authentication. Lastly, the program prints out information about where the keys are stored.
Additionally, a digital and a graphic representation print to the console too. Use the Windows search box to find cmd and open the Command Prompt window. Note: Command not working? Don't worry. There are other ways to generate the keys. Try following our detailed tutorial for generating an SSH key pair on Windows If you set up a specific location for the keys, type in the path now.
Otherwise, press Enter to save the keys in the default path. If keys exist in this location, the output asks to confirm the overwrite. Type Y to confirm and press Enter to continue the setup. Enter the passphrase to encrypt the private key. The directory may already exist, which is fine :. Put the public key in. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Learn more. SSH keys not working Ask Question. Asked 10 years, 9 months ago. Active 3 years, 10 months ago. Viewed 7k times. Improve this question. You might have a permission issue still; Your keys will not work unless they are readable by the owner only.
Giving them weaker permissions only ensures that they will not work.
0コメント