1

I want to set up my company's server as a gateway to all of our client's servers. So that people I work with can simply 'proxy on through' without needing to set up SSH keys on their machine. I.e.

[My local box] -> [Our Company Server (with SSH keys)] -> [Client's server]

So far I have this in my .ssh/config

Host client-server
    User myclient
    ProxyCommand ssh -o Compression=no gateway netcat -w 3 %h %p
    Compression yes

host gateway
    HostName company-server
    User me
    Compression yes

However this still asks for a password for myclient@client-server. I want it to use the ssh key on gateway. Is there any way to achieve this?

1 Answer 1

0

Well, you can start another ssh session right from your .ssh/authorized_keys file:

command="/usr/bin/ssh -i ~/.ssh/id_ecdsa_<user> <server>",no-port-forwarding,no-agent-forwarding,no-X11-forwarding,no-pty ecdsa-sha2-nistp256 <key-data>

You will still need to create a local key file and add it to the target user/server .ssh/authorized_keys.

2
  • Does this mean there will be no keys for the client's server on the local server? Aug 4, 2014 at 11:46
  • @MatthewHaworth Can you clarify this a bit? You are talking about known_hosts, inbound or outbound connections?
    – kworr
    Aug 5, 2014 at 12:53

You must log in to answer this question.

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