From 351894c3ae007c0fb3178c0ffbca288f4e48dda9 Mon Sep 17 00:00:00 2001 From: Jun Suk Ha Date: Fri, 22 Dec 2023 18:24:09 -0500 Subject: [PATCH] add ssh --- _posts/2023-12-22-ssh.md | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 _posts/2023-12-22-ssh.md diff --git a/_posts/2023-12-22-ssh.md b/_posts/2023-12-22-ssh.md new file mode 100644 index 000000000000..8a2f88632165 --- /dev/null +++ b/_posts/2023-12-22-ssh.md @@ -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:`\ +ex) `lsof -i :8000` \ No newline at end of file