Lets say we have three machines
me, proxy, server
I would like to have an ssh connection to server, so normally I would do
me$ ssh proxy proxy$ ssh server server$ # and here we are
ssh proxy solution that is entirely client side would be:
$ cat .ssh/config Host proxy HostName proxy.ip Host server HostName server.ip ProxyCommand ssh proxy -W %h:%p
But If I wolud want to force this proxycommand on my server, I would edit my authorized_keys file like this:
$ cat .ssh/authorized_keys command="ssh user@proxy" ssh-rsa AAA...444 omg@themiddleofnowhere
Okay: these two solutions work the for ssh, but for commands such as
scp and others, the first solution works, while the second one fails.
Question: how can I force the ssh proxy command on my server and still allow commands like
scp to work normally?