I am trying to forward all requests from local port 8888 to port 8888 to my remote Amazon EC2 instance. The only difference is that my EC2 instance is running ssh on custom port 56129.
I can successfully ping my ec2 instance from the local system but when I try to forward requests from a local port to a port on ec2 instance, I am getting:
channel 2: open failed: administratively prohibited: open failed
I am using the following command:
ssh -i <pem key> -NfL 8888:localhost:8888 <user>@<instance ip> -p 56129
Then it asks for a password. There are no messages when it accepts the password. But as soon as I open localhost:8888 in my browser, I get the error message:
channel 2: open failed: administratively prohibited: open failed
Some observations -
Running
ssh -i <pem key> <user>@<instance ip> -p 56129
with a password is successful.I am running Jupyter Notebook at port 8888 in EC2 instance. curl localhost:8888 returns nothing when done after ssh-ing into the instance