본문 바로가기
조회 수 1375 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
SSH Tunnels
http://www.linuxhorizon.ro/ssh-tunnel.html

Syntax: 
ssh -L localport:host:hostport user@ssh_server -N 
ssh -L localport:host:hostport -N -l user ssh_server

-L local-port:host:remote-port : port forwarding parameters ()
-N : Do not execute a remote command.  This is useful for just forwarding ports (protocol version 2 only). 
ssh_server : the ssh server that will be used for forwarding/tunneling 
-l login_name : login name

Example (SSH Client에서) - 1: 
ssh -L 8888:www.linuxhorizon.ro:80 user@computer -N 

Example (SSH Client에서) - 2: 
ssh -L 8888:www.linuxhorizon.ro:80 -L 110:mail.linuxhorizon.ro:110 -L 25:mail.linuxhorizon.ro:25 user@computer -N 
The above shows you how to setup your ssh tunnel for web, pop3 and smtp. It is useful to recive/send your e-mails when you don't have direct access
to the mail server. 
  
For the ASCII art and lynx browser fans here is illustrated the first example: 

   +----------+<--port 22-->+----------+<--port 80-->o-----------+ 
   |SSH Client|-------------|ssh_server|-------------|   host    | 
   +----------+             +----------+             o-----------+ 
  localhost:8888              computer      www.linuxhorizon.ro:80 

...And finally: 
Open your browser and go to http://localhost:8888 to see if your tunnel is working. 
That's all folks! 

예) ssh -L 8888:www.linuxhorizon.ro:80 user@computer -N 

즉, ssh_server의 접근권한이 있을 경우 SSH Client에서 위와 같은 ssh 명령을 통해 ssh_server를 거쳐 최종 target system에 접근가능
1. local 8888 포트로 요청이 오면 (-L)
2. user@computer으로 ssh 접속 (ssh)
3. 접속 후 명령을 실행하지 않고(-N) www.linuxhorizon.ro:80으로 보냄 (-L)


Title
List of Articles
번호 제목 글쓴이 날짜 조회 수
46 Install crunch on Mac and examples Hojung 2015.02.18 2399
45 Create Kali Live USB Persistence from Mac file Hojung 2015.02.18 2721
44 Firewall Assessment with Prometheus file Hojung 2015.02.04 1906
43 Install WebGoat 5.3 in Kali file Hojung 2015.02.02 3317
42 brute-force HTTP/S basic access authentication with hydra file Hojung 2015.01.07 3086
41 Session Cookie 세부항목에 대해 (secure, Http Only flag) Hojung 2015.01.06 4211
40 쉘코드(shell code)란 payload로 사용되는 작은 코드조각 Hojung 2014.12.23 3907
39 Netcat (nc) guide (port scan, file transfer, backdoor, reverse shell, source port/ip) Hojung 2014.12.16 2068
» SSH Tunnels (ssh -L localport:host:hostport user@ssh_server -N) Hojung 2014.12.16 1375
37 How to install Damn Vulnerable Linux (DVL) file Hojung 2014.11.26 2801
36 Five Steps of a Hacking Attack Hojung 2014.11.24 1255
35 How to install Snorby in Kali (snort) Hojung 2014.11.19 2541
34 TightVNC on Kali Hojung 2014.11.18 2028
33 10 stage Generic attack process in a nutshell (in chronological order) Hojung 2014.11.07 1446
32 Send HEAD request with netcat (nc - banner grabbing) Hojung 2014.11.05 1575
31 Birthday Attack, Birthday Paradox Hojung 2014.11.03 1497
30 Discovering rogue AP with nmap Hojung 2014.11.03 1442
29 DoS (Denial of Service) 공격에 대해 (Ping of Death, Syn Flooding 공격/탐지/대응, Tear Drop, Smurf/Fraggle, LAND Attack) file Hojung 2014.11.02 4685
28 DNS Spoofing from GUI (ip forwarding + arp spoofing + dns spoofing with ettercap) file Hojung 2014.10.06 2496
27 DNS Spoofing from CLI (ip forwarding + arp spoofing + dns spoofing with ettercap) file Hojung 2014.10.06 4212
Board Pagination ‹ Prev 1 2 ... 3 Next ›
/ 3

Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5