forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jun Suk Ha
committed
Dec 22, 2023
1 parent
4c27da3
commit 351894c
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
layout: post | ||
title: access ssh localhost | ||
date: 2023-12-22 18:23:00 | ||
description: how to access localhost in a machine I sshed into | ||
tags: ssh | ||
categories: learning | ||
featured: false | ||
--- | ||
|
||
Run from iterm (mac) | ||
|
||
`ssh -L 9090:localhost:8000 jun@hotcake` | ||
|
||
=> mac's 9090 port is tunneled to localhost (hotcake) 8000 port | ||
|
||
--- | ||
|
||
Run from hotcake | ||
|
||
`docker run -d --name api-server -p 8000:8000 part5-api-server` | ||
|
||
=> localhost (hotcake) port 8000 is connected to container's 8000 port | ||
|
||
--- | ||
|
||
Access to | ||
|
||
http://localhost:9090/docs | ||
|
||
from mac edge browser. | ||
|
||
|
||
--- | ||
|
||
|
||
Use this for 1) MLflow Setup | ML Engineer를 위한 MLOps (mlops-for-mle.github.io) | ||
|
||
ssh -L 9091:localhost:5001 jun@hotcake | ||
|
||
--- | ||
|
||
How to find which PID is using which port?\ | ||
`lsof -i:<port>`\ | ||
ex) `lsof -i :8000` |