'2024/07'에 해당되는 글 2건

  1. 2024.07.08 ssh 터널링 L
  2. 2024.07.08 ssh 터널링 R

ssh 터널링 L

도산공원 2024. 7. 8. 01:03

ssh -fN -L 80:192.168.0.10:80 -l {user_account} {remote_machine}

ssh -fN -L {로컬에서 접속할 포트}:{목표 서버 ip}:{목표 서버 포트} -l {경유지 계정} {경유지 ip}

 

ex) ssh -fN -L 5333:10.220.176.71:5444 -l root 14.63.145.145 ==> postgrel가 설치되어있는 10.220.176.71:5444로 접속이 불가능 했다. 그래서 DB 서버와 연결가능한 다른 서버 14.63.145.145를 경유해서 터널링을 시도. root 계정의 비번을 입력후 , 내 로컬pc에서 5333포트로 접속을 하니 DB서버 연결 가능. 
-f : Requests ssh to go to background just before command execution.
-N : Do not execute a remote command. This is useful for just forwarding ports.

'도산공원' 카테고리의 다른 글

ssh 터널링 -D  (0) 2024.08.08
ssh 터널링 R  (0) 2024.07.08
12  (0) 2015.08.16
Posted by wakira
,

ssh 터널링 R

도산공원 2024. 7. 8. 00:55

ssh -Nf -R  0.0.0.0:1234:127.0.0.1:5678 id@ip -p port
ssh -fN -R 0.0.0.0:1234:127.0.0.1:3389 a@b.c.d -p 21111


ip주소의 1234포트로 접속하면
위 커맨드실행한 컴퓨터 5678포트로 접속한다
-f : Requests ssh to go to background just before command execution.
-N : Do not execute a remote command. This is useful for just forwarding ports.

'도산공원' 카테고리의 다른 글

ssh 터널링 -D  (0) 2024.08.08
ssh 터널링 L  (0) 2024.07.08
12  (0) 2015.08.16
Posted by wakira
,