ssh-keygen  help needed

akp007
akp007 used Ask the Experts™
on
Dear Experts -

I am looking for some guidance. Here is the situation. Solaris operating system

Server A ===>  Server B ====> Server C.

I set up the ssh-keygen between the servers so that I can get into  B from A with out password.

from B to C with out password.

 My goal is to A to C with no password.

and I want this process to running in the background.

I appreciate your help. I have been struggling with since 2 days.

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
President
Commented:
Hi,

to accomplish these you'll either:
- duplicate the keys you've created in server A to both Server B and Server C
- copying both public and private keys.

This is simpler yet you have to put the private key to all servers. Please make sure that directory rights must be followed otherwise it won't work though it wont print any error. Just key login failed.

- chmod 700 .ssh
- chmod 600  id_rsa*
- copy id_rsa.pub to authorized_keys

Please see this document that I'd previously authored: SSH access using public key

This has been said there's another and better method. :
- You run ssh-agent and feed your id_rsa key to it on System A.
- System B and System C will have only the id_rsa.pub renamed to authorized_keys and whenever required your ssh-agent will supply your private key for authentication so you wn2t be asked for password again.

Please see the man pages for ssh-keygen, ssh-agent

Cheers,
K.


- On System B and System C you'l only have

Author

Commented:
Thanks a lot for the material as well as for the response. I tried exactly the same

1. On server A , I created id_rsa and Id_rsa.pub.

2. copied it to Server B . Generated the Authorization key.

3.  copied the authorization_key to Server C.

4. I did exec ssh-agent /usr/bin/bash and ssh-add on Server A

5. I did the same thing on Server B

5. now I did the following on Server A
ssh -tC -L  6003:localhost:7003 serverB "ssh -C -L 7003:serverB:9002  Server C"

6. It still prompts for id_rsa to get server C.  

Am I doing any thing wrong, that you can think


Appreciate your help.

Author

Commented:
I am still getting password prompt. I will open that as separate question. Thanks for the help

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial