Solved

Passwordless SSH issue

Posted on 2013-06-14
10
325 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 29

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
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 

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
 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In every aspect, security is essential for your business, and for that matter you need to always keep an eye on it. The same can be said about your computer network system too. Your computer network is prone to various malware and security threats t…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

734 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