How do I forward all requests from local port to port on my remote Amazon EC2 instance which is using a custom ssh port
0
votes
2
answers
2585
views
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 -NfL 8888:localhost:8888 @ -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 @ -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
Asked by kusur
(111 rep)
Feb 20, 2022, 03:17 PM
Last activity: Aug 4, 2025, 04:10 AM
Last activity: Aug 4, 2025, 04:10 AM