?
Solved

SSH no password

Posted on 2012-04-09
5
Medium Priority
?
598 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
[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
5 Comments
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 400 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 79

Assisted Solution

by:arnold
arnold earned 400 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 400 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 400 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 400 total points
ID: 37828108
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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 …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 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