LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ssh-agent forwarding (order of authentication) (https://www.linuxquestions.org/questions/linux-software-2/ssh-agent-forwarding-order-of-authentication-181740/)

podollb 05-15-2004 09:29 AM

ssh-agent forwarding (order of authentication)
 
I have created a ssh key (dsa) that I put on some remote systems (at work) in ~/.ssh/authorized_keys2 and then I was able to start up an agent from home and log in passwordless, but I have 4 linux boxes at home that I have done the exact same thing on and it still prompts me for the password (of my user account) and ignores the ssh-agent I am forwarding. So my question is do I need to change the order of authentication somewhere so that I can set it up to first look for a ssh-agent being forwarded rather than prompting me for the user password?

mago 02-23-2011 09:16 AM

@work do you have:
Code:

Host *
ForwardAgent yes

on your /etc/ssh/ssh_config or your ~/.ssh/config file?

podollb 02-23-2011 09:49 AM

Thanks for the reply, although I resolved the issue about 6 years ago :)

nak1090 10-29-2011 06:23 AM

Hi all
I have a diagram A<-->B<-->C
A can SSH to B without password, B can SSH to C without password
I want SSH from A to C with agent forward.
I had config in /etc/ssh/ssh_config
Code:

Host *
ForwardAgent yes

But I can't remote ssh from A to C..
Help me.
Thanks!!

Reuti 10-29-2011 01:47 PM

Why didn’t you create a new thread, as you have completely new question?

Anyway, you will need to create a tunnel for the final connection:
Code:

$ ssh -N -L 7890:C:22 B
When you get no error it’s fine, although the prompt won’t come back. You can send this eiter in the background by & or use in another session the just created tunnel:
Code:

$ ssh -p 7890 localhost
Instead of 7890 you can use any other available port too.

nak1090 10-29-2011 02:21 PM

Hello Reuti, thanks for your reply.
Because I see Podollb resolved the issue so I post question here.
But I want remote from A to C without password thought B. B is a Agent-forwarding.
You can see "Public Key Access with Agent Forwarding " in http://unixwiz.net/techtips/ssh-agent-forwarding.html

nak1090 11-03-2011 12:30 AM

Who can help me, please !??

Reuti 11-03-2011 06:35 AM

Did you try what I posted and got an error?

nak1090 11-03-2011 07:17 AM

Your post was no error...
But I want do it by another way :(.
A <---> B: SSH without password by key-based authentication
B <---> C: SSH without password by key-based authentication
And I want A <---> C: ssh without password which don't use key-based authentication (B is forwarding)
Although I have config in /etc/ssh/ssh_config
Quote:

Host *
ForwardAgent yes
But it not working :-s


All times are GMT -5. The time now is 09:54 PM.