Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SSH no password

Posted on 2012-04-09
5
Medium Priority
?
604 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 80

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
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.
Suggested Courses

610 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