Solved

OpenSSH Passwordless Authentication between 2 systems with different UID's

Posted on 2006-10-30
1
1,139 Views
Last Modified: 2013-12-04
How to communicate without a passwd between 2 Unix systems where
the communicating sessions have different uid/s? (NOTE: both systems
are on OpenSSH)

e.g.


SystemA UserA SSH to SystemB UserB


Here is what I tried but failed.


As UserA in System A:



> ssh-keygen -t dsa
> cd ~/.ssh
> cat id_dsa.pub > authorized_keys2
> scp ./id_dsa.pub UserB@SystemB:.ssh/.  (when prompt for the passwd, I typed UserB's passwd)


As UserB in System B:


> cd .ssh
> cat id_dsa.pub > authorized_keys2


I tried the setup for the same user ID on both systems, it would work in the above example (i.e. SystemA UserA SSH to SystemB UserA)

Could someone tell me what am I missing?  Thank you very much!


0
Comment
Question by:cklh
1 Comment
 
LVL 48

Accepted Solution

by:
Tintin earned 100 total points
ID: 17845665
The correct steps are:

On system A as User A

ssh-keygen -t dsa
ssh userB@systemB "mkdir .ssh;chmod 700 .ssh"
cd ~/.ssh
scp id_dsa.pub userB@systemB:.ssh/authorized_keys

Then you should be able to do:

ssh userB@systemB
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

As I write this article, I am finishing cleanup from the Qakbot virus variant found in the wild on April 18, 2011.  It was a messy beast that had varying levels of infection, speculated as being dependent on how long it resided on the infected syste…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

914 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

18 Experts available now in Live!

Get 1:1 Help Now