Solved

SSH no password

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to get maximum transfer speed over LAN 4 83
AWS- KeepAlived notify script not working 23 83
Martian Packets Unix 5 51
Setting up static IP - Ubuntu server 16.04 12 64
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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 …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

777 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