- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
Hello,
To forward ports from your SageMaker notebook instance to your local machine, you can use SSH port forwarding. Here are the basic steps:
Get the public IP address of your SageMaker notebook instance. You can find this in the SageMaker console under Notebook instances.
On your local machine, open a terminal and use SSH to connect to the notebook instance:
ssh -i <key-file> -N -L 8000:localhost:8000 ubuntu@<public-ip-address>
-
Replace <key-file> with the path to the SSH key file you used to launch the notebook, and <public-ip-address> with the actual public IP.
-
The -N flag tells SSH to not execute a remote command, just set up port forwarding. -L specifies the local port to forward (8000) to the remote port (8000) on localhost.
-
Now when you go to http://localhost:8000 in your local browser, it will be forwarded to port 8000 on the remote SageMaker notebook instance.
-
You may need to keep the SSH session running for the forwarding to remain active. You can run it in the background with
ssh ... &
Thanks
Abhinav
Contenuto pertinente
- AWS UFFICIALEAggiornata 5 mesi fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata un anno fa
Hi Abhinav Chauhan, Thank you for your reply. But a I very novice in this platform so i am unable to find this <key-file> for notebook instance. Please help me for getting this information.