Artificial intelligent assistant

ssh bastion host proxy command This is a weird situation where the same command works when inputted directly in shell but not when it's a ProxyCommand in ssh config file. So this works: $ ssh -A -R 40022:git.some.pt:22 -t -t user@bastion.net ssh -t -t -R 40022:localhost:40022 user@destination.net But this doesn't: in ~/.ssh/config Host destination ProxyCommand ssh -A -R 40022:git.some.pt:22 -t -t user@bastion.net ssh -t -t -R 40022:localhost:40022 user@destination.net $ ssh destination Bad packet length 218783296. Disconnecting: Packet corrupt Any ideas why?

You need to allow your command line `ssh` to connect to an ssh server somewhere. Your existing `ProxyCommand` doesn't do that - it provides all the means to log in somewhere and there's nothing left for your initial `ssh`.

This seems to work reasonably well for me, and I think I've got your chain right (obviously it's harder for me to test with the same hostnames that you use). Note that it does use `nc` rather than `ssh` on the bastion host, though:


Host destination.net
User user
ProxyCommand ssh -A user@bastion.net nc %h %p
ForwardAgent yes
RemoteForward 40022 git.some.pt:22


I have also been looking at running `/usr/sbin/sshd -i` on the end of `ssh -p %p user@%h` (instead of the `nc %h %p`), as suggested by man ssh_config, but I cannot get that to work. Maybe you'll have more luck.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 72887427712262c5d1331cb65c4a7ce6