ssh 원격 포트 전달

2840 단어 ARM
장면 사용: 클라이언트: 내장형 Linux 게이트웨이root@IoTP서버: 아리운 서버root@VM_0_14_centos서버 로그인 클라이언트
  • 클라이언트가 실행됩니다
  • root@IoTP:~# ssh -K 30 -I 180 -y -g -f -N -T -R 211.159.189.50:55407:127.0.0.1:22 [email protected]
    
    Host '211.159.189.50' key accepted unconditionally.
    (ecdsa-sha2-nistp256 fingerprint md5 91:90:85:fd:b1:e0:90:33:38:b6:67:a9:92:82:c0:0e)
    [email protected]'s password: 
    root@IoTP:~# 
    
  • 서버가 실행됩니다
  • [root@VM_0_14_centos zxzz]# netstat -anp | grep 55407
    tcp        0      0 127.0.0.1:55407         0.0.0.0:*               LISTEN      11136/sshd: root    
    [root@VM_0_14_centos zxzz]# ssh -p 55407 [email protected]
    [email protected]'s password: 
    root@IoTP:~# ifconfig 
    br-lan    Link encap:Ethernet  HWaddr F4:E1:1E:9C:54:9C  
              inet addr:192.168.188.1  Bcast:192.168.188.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:29174 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4834 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:1629080 (1.5 MiB)  TX bytes:203028 (198.2 KiB)
    
    eth0      Link encap:Ethernet  HWaddr F4:E1:1E:9C:54:9C  
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:31964 errors:0 dropped:0 overruns:0 frame:0
              TX packets:6230 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2313436 (2.2 MiB)  TX bytes:373800 (365.0 KiB)
    
    eth1      Link encap:Ethernet  HWaddr F4:E1:1E:9C:54:9E  
              inet addr:192.168.3.29  Bcast:192.168.3.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:841643 errors:0 dropped:36859 overruns:0 frame:0
              TX packets:38983 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:72265458 (68.9 MiB)  TX bytes:3794139 (3.6 MiB)
    
    eth2      Link encap:Ethernet  HWaddr 1A:C6:A7:1B:A6:52  
              inet addr:10.149.66.69  Bcast:10.149.66.71  Mask:255.255.255.252
              UP BROADCAST RUNNING NOARP MULTICAST  MTU:1500  Metric:1
              RX packets:54 errors:0 dropped:0 overruns:0 frame:0
              TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:17404 (16.9 KiB)  TX bytes:19756 (19.2 KiB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:2924 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2924 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:355778 (347.4 KiB)  TX bytes:355778 (347.4 KiB)
    
    root@IoTP:~# 
    
    

    내장 장치의 암호를 입력하면 원격 액세스가 가능합니다.exit를 입력하여 액세스를 종료합니다.

    좋은 웹페이지 즐겨찾기