Start a new topic
Answered

Configure ForwardAgent for iTerm2 on TSX 3.2.1

Hey folks,


Does anyone know if its possible to configure the ssh ForwardAgent setting for iTerm2 connections on TSX?  I have it set in my ~/.ssh/config file which works great when I use terminal to ssh to machines but when I try to use Royal TSX it seems to ignore that setting.


Best Answer

Hi Wes,


by default, Royal TSX runs terminal sessions without a local shell which means that your ssh config file is not taken into consideration. However, you can configure your session to run inside a login shell by going to the "Advanced - Session" properties of your SSH connection and enable "Run inside Login Shell".

Alternatively, you can also directly pass the ForwardAgent option to the ssh connection by enabling "Allow Agent forwarding" in the "Advanced - SSH" properties of your SSH connection. Or, if you want to pass additional options to the ssh command, you can add these using the "Additional SSH Options" field in the "Advanced - SSH" properties.


Hope that helps!


cheers,

felix


Hi Wes,


check out this post as it explains the changes Apple has made to ssh-agent in Sierra and provides workarounds for the shortcomings of the new system.


cheers,

felix


1 person likes this
Answer

Hi Wes,


by default, Royal TSX runs terminal sessions without a local shell which means that your ssh config file is not taken into consideration. However, you can configure your session to run inside a login shell by going to the "Advanced - Session" properties of your SSH connection and enable "Run inside Login Shell".

Alternatively, you can also directly pass the ForwardAgent option to the ssh connection by enabling "Allow Agent forwarding" in the "Advanced - SSH" properties of your SSH connection. Or, if you want to pass additional options to the ssh command, you can add these using the "Additional SSH Options" field in the "Advanced - SSH" properties.


Hope that helps!


cheers,

felix

Hey Felix,


Thanks for the response.  I've tried the following based on your suggestion with no luck.

-Checking the Allow Agent forwarding box

>Still prompted for password when I try to ssh to the next machine

-Checking run inside local shell

>Still prompted for password when I try to ssh to the next machine


I am unsure of the syntax of the Additional SSH Options box and when I configure it with $SSHAllowAgentForwarding$ my sessions won't connect.


I'm not sure how to proceed.


Thanks,
Wes

Hi Wes,


have you tried with both options enabled?


The Allow Agent Forwarding box simply passes the -A flag to the ssh command which is described as follows in "man ssh": "Enables forwarding of the authentication agent connection."


There is no special syntax for the additional ssh options field. Everything you put in that box is simply passed to the ssh command. So, enabling the Allow Agent Forwarding box is equivalent to having "-A" in the additional ssh options field.


Hope that helps!


cheers,

felix

Hey Felix,


Ends up I had to re-add my identity file to ssh using ssh-add and then the path to my ssh key.  Now forwarding works correctly with the options you told me about! Thanks for your help.


-Wes

Login or Signup to post a comment