Blink: ssh-agent forwarding not work

Created on 5 Dec 2019  路  8Comments  路  Source: blinksh/blink

I can't figure out how to make ssh-agent forwarding. I'm connected with key to my server and I want to jump to another one using the same key, but it not work.

Most helpful comment

Have you used ssh agent forwarding before? its the same using blink, with the only wrinkle specific to blink shell being that you MUST run ssh-agent manually as it's not running by default:

In one blink tab (leave this open and running):
ssh-agent

open a new blink tab and add your key(s) to the ssh agent:

ssh-add yourkeyname

To confirm the key you want forwarded has been added to the ssh agent ( capital 'L' and lowercase 'l' would both work for this step, but _are_ different flags) :

ssh-add -L

Then ssh to your host with the 'forward my keys for this connection from the ssh agent' flag (capital 'A' as lowercase 'a' disables the option)

ssh -A yourhost

FYI: mosh doesn't support key forwarding... so if you're expecting mosh to work just like ssh in this regard, it won't.

Screenshot 2019-12-17 at 12 29 53 PM
Screenshot 2019-12-17 at 12 36 22 PM

All 8 comments

I just ran into this issue and it seems you have to start the ssh-agent, open a new blink tab, ssh-add and then ssh -A . The blink tab with ssh-agent running needs to remain open, and MUST be done every time.

Certainly not ideal.

Its not working for me. Do I need something extra?

Have you used ssh agent forwarding before? its the same using blink, with the only wrinkle specific to blink shell being that you MUST run ssh-agent manually as it's not running by default:

In one blink tab (leave this open and running):
ssh-agent

open a new blink tab and add your key(s) to the ssh agent:

ssh-add yourkeyname

To confirm the key you want forwarded has been added to the ssh agent ( capital 'L' and lowercase 'l' would both work for this step, but _are_ different flags) :

ssh-add -L

Then ssh to your host with the 'forward my keys for this connection from the ssh agent' flag (capital 'A' as lowercase 'a' disables the option)

ssh -A yourhost

FYI: mosh doesn't support key forwarding... so if you're expecting mosh to work just like ssh in this regard, it won't.

Screenshot 2019-12-17 at 12 29 53 PM
Screenshot 2019-12-17 at 12 36 22 PM

You are my life saver. This works great! Thank you for the tutorial.
It will be great if it works out of the box, I hope Blink will do it in the future.

What would it take for us to make this work out of the box?

Would the ideal way of doing this be a setting under config for ssh-agent forwarding, which would spin up the ssh-agent on the background and automatically add the -A option on any ssh connection?

Just installed latest blink from AppStore, and ssh -A is not there :(

@xslim you have to run ssh-agent command in separate tab at this moment. We will improve that in next version.
So in one tab run ssh-agent command, then in another tab you can use ssh-add command to add keys and finally you can use ssh -A

Yes I did all that in beginning, and it did not work. After restarting the app it does work. Magic. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nriley picture nriley  路  3Comments

jra picture jra  路  5Comments

balboah picture balboah  路  3Comments

zaptrem picture zaptrem  路  4Comments

goerz picture goerz  路  4Comments