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
Solved

SSH no password

Posted on 2012-04-09
5
591 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 77

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

809 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