Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way/option/wrapper for ssh that will permit not only agent-forwarding but also configuration forwarding?

For instance, consider a workstation and a server. The workstation ~/.ssh/config defines the hosts somehost and server but the server config file is empty. Is it possible while on server to use workstation's config file in this manner:

user@workstation$ ssh server # server is defined in .ssh/config on workstation

 successful login on server

user@server$ ssh somehost # somehost is defined in .ssh/config on workstation
                          #                  but NOT in .ssh/config on server

 successful login on somehost

user@somehost$ _

i.e. I WANT to refer to workstation's config file while being on server.

share|improve this question
You question isn't clear. Do you refer to the client (/etc/ssh/ssh_config or ~/.ssh/config) or the server configuration file (/etc/ssh/sshd_config) on server, i.e. the intermediate hop? – 0xC0000022L Feb 14 '13 at 22:18
@0xC0000022L, sorry for the confusion. I WANT to refer to workstation's config file while being on server. – Krastanov Feb 14 '13 at 22:32

The only possibility I can think of from the top of my head that doesn't involve actual copying would be to create a tunnel from the client (workstation) to somehost via ssh -w ..., thereby allowing you to connect "directly" from workstation to somehost.

So you dig a tunnel server to somehost and thereby make somehost available for workstation. That is if port forwarding hasn't been disabled or restricted.

The only other possibility that comes to mind is to copy the config file over, using scp, and then start the ssh client on server using ssh -F <your-copied-config>. As a variation on that theme you could of course parse the config files on workstation and pass the options using -o ....

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .