0

This works

ssh -i -Y -v "key.pem" ubuntu@ec2-52-14-84-246.us-east-2.compute.amazonaws.com

This is port forwarding from another SO question

ssh -L 2222:localhost:8888 -N -o GatewayPorts=yes hostname-of-M

I'm told I need to forward from remote 6001 to localhost 6000. How do I combine the two commands? Thanks!

0
ssh -i -Y -v "key.pem" ubuntu@ec2-52-14-84-246.us-east-2.compute.amazonaws.com

This can't work. You mixed up arguments. It should be ... -i "key.pem"-Y -v .... It simply does X11 forwarding.

ssh -L 2222:localhost:8888 -N -o GatewayPorts=yes hostname-of-M

This forwards remote port 8888 to local port 2222. You just need to replace the port numbers:

ssh -L 6000:localhost:6001 -i "key.pem" -Y ubuntu@ec2-52-14-84-246.us-east-2.compute.amazonaws.com

Nothing more, nothing less.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.