Skip to content

Commit

Permalink
add ssh
Browse files Browse the repository at this point in the history
  • 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.
45 changes: 45 additions & 0 deletions _posts/2023-12-22-ssh.md
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`

0 comments on commit 351894c

Please sign in to comment.