I am trying to access a Truenas server at work and I am able to connect to it with ssh proxycommand setup through my config. I am currently able to connect to the servers normally with my ssh config set-up as:
Host proxy_host
Hostname proxy_host_ip
User proxy_user
IdentityFile ~/.ssh/id_rsa_proxy_host
Port 22
Host truenas_host
Hostname truenas_host_ip
User truenas_user
IdentityFile ~/.ssh/id_rsa_truenas_host
Port 22
ProxyCommand ssh -W %h:%p proxy_host
However, I now need to do port forwarding to access the a plugin on the truenas server. I have tried setting-up the port forwarding like this, but with no success.
Host proxy_host
Hostname proxy_host_ip
User proxy_user
IdentityFile ~/.ssh/id_rsa_proxy_host
Port 22
LocalForward 8283 truenas_host_ip:8283
Host truenas_host
Hostname truenas_host_ip
User truenas_user
IdentityFile ~/.ssh/id_rsa_truenas_host
Port 22
LocalForward 8283 127.0.0.1:8283
ProxyCommand ssh -W %h:%p proxy_host
However, this is not working. What are the proper ways to set this up, and is LocalForward the best approach, or should I be using DynamicForward or RemoteForward?