Use simple ssh feature, like this:
ssh -F path/to/config
Add the ssh config (ex. in config dir):
Host your_server_available_from_gateway_server
User username
ForwardAgent yes
ProxyCommand ssh gateway_server nc %h %p
In recap you should use this:
set :ssh_options, { :config => 'path/to/config'}