Solved

SSH no password

Posted on 2012-04-09
5
585 Views
Last Modified: 2012-04-11
I am trying to get ssh working without password entry.  I can't get the no password prompt to work.

I did the following.

I want to scp from server A to server B.

I copied id_rs.pub on server A to server B.   I renamed it authorized_keys in server B'.s .ssh directory.

I did chmod 600 on authorized keys
I did chmod 700 on .ssh

It still prompts for a password.. Any ideas why it doesn't work?  Server A is Solaris and Server B is Linux.
0
Comment
Question by:lcor
5 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 100 total points
ID: 37825275
You didn't mention having the private key on server A.

Try

ssh -vvv

To see the debug messages.
0
 
LVL 76

Assisted Solution

by:arnold
arnold earned 100 total points
ID: 37825627
id_rsa.pub or id_rsa.pub should be in authorized_keys2
The ther check /etc/ssh/sshd_config and make sure publickey auth is enabled. Rsauthentication yes
Etc.


Running the ssh -vvvvv as suggested will tell you what the problem might be.
0
 
LVL 6

Assisted Solution

by:Tomunique
Tomunique earned 100 total points
ID: 37827129
Also,
Check the value of StrictModes in /etc/ssh/sshd_config
If no, then ignore my post.
If Yes, or commented out,
check the perms on all directories making up $HOME
from $HOME location back to /   (/, /home, /home/myuserid )
If group or other is writeable on any directory above you (on both Server A and Server B)
then it will ignore the keys.
0
 
LVL 2

Accepted Solution

by:
bandris earned 100 total points
ID: 37827397
use ssh-copy-id command to distribute your public key (if you have this command on solaris)
 ssh-copy-id [-i [identity_file]] [user@]machine
that should handle the permission problems, one usually get

(do you already loaded your private key to your ssh agent right ? > ssh-agent bash; ssh-add)
check the owner of the .ssh dir, and the authorized_keys file, should match the user.

Alternatively you can use
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
0
 
LVL 3

Assisted Solution

by:rickygm
rickygm earned 100 total points
ID: 37828108
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

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

16 Experts available now in Live!

Get 1:1 Help Now