Google provides a very useful tool especially for those I’m calling “cloud workers”: the Cloud Shell. This gives you access to a linux-shell for just whatever you do usually in a linux shell - directly from your browser.
From time to time I use the cloud shell as a starting-point to connect via ssh to other systems. Recently I noticed that tcp-port-forwarding via the outgoing ssh-connections doesn’t work out of the box: When trying to establish a port-forwarding (
ssh user@targethost -L 8080:127.0.0.1:8080) the following error occurs:
bind: Cannot assign requested address
… and the port-forwarding doesn’t work.
The reason for this is simple - as always as you know it: The ssh-client tries to bind to the local ipv6-port. This is not supported in the cloud shell and therefore fails.read more »