Score:1

Use local ssh_config settings on a remote server

dk flag

Good day, friends!

I've got a locally configured ~/ssh/config file with all the hosts set up as they should. I am using them successfully when doing my ssh from the local computer like ssh dev. But when I am on a remote server I cannot do it and get this error Could not resolve hostname XYZ: Name or service not known. I have configured my local keys to be passed to remote system with ForwardAgent yes, so I can use them when ssh-ing further from the remote machine. The only piece of a puzzle is being able to use my locally defined ssh config (and just maybe known_hosts too).

Please give any suggestions on how to achieve this.

For the context - I am setting up a remote dev environment in the cloud, from which I can rsync to and from productin servers.

in flag
There is nothing built in to OpenSSH to do this. There is 3rd party tools to sync your home dir, or deploy config files to multiple systems. You probably need to look at one of those. Tracking your homedir in git might be an option, or using something like ansible to deploy an ssh config to all the systems you need the config on.
dk flag
Thanks, @Zoredache! Could you please recommend some of those 3rd party tools?
in flag
Lots of hits on google for [track homedir dotfile git](https://www.google.com/search?q=track+homedir+dotfiles+git), as for deploying, as I mentioned I use ansible, though salt, or some other configuration management tool would work, if you aren't using some configuration management engine, you might want to consider it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.