Solved

Passwordless SSH issue

Posted on 2013-06-14
10
311 Views
Last Modified: 2013-06-27
I have a client that is requiring me to setup an ssh server that they can access with no password. I think I have configured everything properly however they are still being prompted for a password. When trying a loop back after generating local keys I am also being prompted for a pass. Can someone please lend some guidance as I am out of ideas.

I have attached a screenshot of my loopback debug log.

Thanks
0
Comment
Question by:MRS
10 Comments
 
LVL 9

Expert Comment

by:gt2847c
ID: 39247661
Did you set up the authorized_keys file in the users .ssh directory?
0
 
LVL 28

Expert Comment

by:Jan Springer
ID: 39247778
The users public key (from the remote machine) needs to be added to the authorized_keys or authorized_keys2 (whichever the sshd_config specifies) file of the local account.
0
 
LVL 9

Accepted Solution

by:
gt2847c earned 500 total points
ID: 39247792
Here's an article on configuring the authorized_keys file.  

The sshd_config file _jesper_ mentions is often located in /etc/ssh/  

Look for the line:

#AuthorizedKeysFile     .ssh/authorized_keys

The above is commented out, but shows the default that SSH looks for.  If that line is not commented out, then substitute the named file for authorized_keys
0
 

Author Comment

by:MRS
ID: 39247830
I have the public key in the users authorized_keys file and the permissions on .shh set to 700 and authorized_keys set to 640 but still no success. Is there something in the sshd_config that needs to be changed?
0
 
LVL 9

Expert Comment

by:gt2847c
ID: 39247840
could you post the debug you mentioned in the original post?  that never got attached.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 9

Expert Comment

by:gt2847c
ID: 39247845
Also, did you check the permissions on the key files themselves?  Those too are checked.  Those should be 600 or 400.
0
 

Author Comment

by:MRS
ID: 39247855
I thought that adding the keys to authorized_keys did away with the requirement to keep the key? In fact I have seen many documents stating to remove them from the system
0
 
LVL 9

Expert Comment

by:gt2847c
ID: 39247880
If they're gone, shouldn't be a problem other than you mentioned tried the login locally, so you would have to have the private key for that to work and not get prompted for the password.
0
 
LVL 1

Expert Comment

by:crucial_paradigm
ID: 39258214
Could be as simple as the way the user is connecting?

are they using:
ssh <ip address>

as opposed to:
ssh user@<ipaddress>
0
 
LVL 3

Expert Comment

by:rajeev2353
ID: 39264975
hi,
you can do it in simple method without password go to other server

you can run this command

 cat /root/.ssh/id_rsa.pub | ssh b@B 'cat >> /root/.ssh/authorized_keys'
b@B's password: give the password

and go to command
# ssh b@b

you are log in without password
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Cybersecurity has become the buzzword of recent years and years to come. The inventions of cloud infrastructure and the Internet of Things has made us question our online safety. Let us explore how cloud- enabled cybersecurity can help us with our b…
Phishing is at the top of most security top 10 efforts you should be pursuing in 2016 and beyond. If you don't have phishing incorporated into your Security Awareness Program yet, now is the time. Phishers, and the scams they use, are only going to …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now