11.Nas_1


시놀로지 dsm6에서 plink 활동하여 putty 자동접속까지 확인 합니다


  • 링크


  • 컨텐츠 정보

    • 10,465 조회
    • 1 댓글
    • 0 추천
    • 목록

    본문

    시놀로지 dsm6에서 plink 활동하여 putty 자동접속까지 확인 합니다 

    \r\n

     

    \r\n

    시놀로지 dsm6 사용방법

    \r\n

    plink -ssh 아이피 -P 포트 -l 아이디 -pw 패스워드

    \r\n

    plink -ssh 192.168.0.6 -P 22 -l admin -pw 123456

    \r\n

    이후 깨지는 화면이지만 명령 실행가능 

    \r\n

     

    \r\n

    시놀로지 dsm6에서 plink 활동하여 putty 자동접속까지 확인하고 명령이  putty와 동일하게 동작,

    \r\n

    2016-11-20_123741.png

    \r\n

     

    \r\n

     

    \r\n

    -------  이하 펌자료 --------------

    \r\n

    plink.exe -load ns <ip_addr> -l <user> -pw <password> <script path/name>

    \r\n


    \r\n

    일반적인 사용법

    \r\n


    plink -N -L 4440:localhost:3389 서버주소 -P 서버포트 -l 계정 -pw 패스워드
    -L 옵션 사용시
    여기에서 localhost를 내 PC의 localhost로 착각한다
    아니다, 여기서 localhost = 서버주소이다

    단순하게 포트 포워딩을 위하여 사용하는 경우 -R 옵션은 불필요하다
    포트포워딩은 -L 옵션으로 충분하다

    복수의 서버에 포트 포워딩을 해야하는 경우
    plink -N -L 4440:서버주소1:3389  -L 4440:서버주소2:3389  서버주소 -P 서버포트 -l 계정 -pw 패스워드
    단순하게 -L 옵션을 한번 더 써주면 된다

    \r\n


    \r\n

     자동로그인 방법 http://www.orakhada.com/191

    \r\n
    \r\n

    2016-11-20_115920.png

    \r\n

     

    \r\n

    ==============

    \r\n

    방화벽을 우회하는 방법에 대해서 알려주세요.

    \r\n

    http://codingdojang.com/scode/308

    \r\n

     

    \r\n
    \r\n
    \r\n
    \r\n
    0
     추천Lv. 3
    \r\n
    \r\n
    \r\n

    SI 개발자는 보통 "갑" 업체에 상주하여 프로젝트를 진행하게 됩니다. 
    "갑" 업체에서는 대부분 보안을 고려하여 인터넷 접속을 제한하는데요,,

    \r\n

    이럴 경우 외부메일을 사용하지 못하게 되고 종종 필요한 정보를 검색하지 못할 경우도 생깁니다. 개발에 꼭 필요한 정보를 얻지 못할 경우 매우 난감하기도 합니다.

    \r\n

    "갑" 업체의 방화벽을 우회하여 외부 인터넷 접속을 자유롭게 할 수 있는 방법이 있나요?

    \r\n

    다음과 같은 조건을 만족할 경우 가장 확실한 방법이 하나 있습니다:

    \r\n
    1. \r\n
    2. 자신이 운영하는 개인 서버 또는 회사 서버가 있고 그 서버에 ssh 서비스를 구동 시킬 수 있다.\r\n
    3. "갑" 업체에서 위 1번 서버 80포트 또는 8080포트에 접속이 가능하다. (보통 웹 포트를 80, 8080으로 사용하기 때문에 특별한 이유가 없는 한 "갑" 업체에서 막지 않습니다.)
    \r\n

    위 2가지 조건을 만족한다면 아래와 같은 방법을 사용해 보세요:

    \r\n
    1. \r\n
    2. \r\n

      내가 접속 가능한 서버에 설치된 ssh 의 접속포트를 80 또는 8080으로 변경한다.
      우분투의 경우라면 /etc/ssh/sshd_config 파일의 Port 항목을 80 또는 8080으로 변경

      \r\n
    3. \r\n

      plink.exe 프로그램 다운로드 하기:
      http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

      \r\n
    4. \r\n

      다음과 같은 cmd파일 작성하기

      \r\n
      \r\n

      myssh.cmd
      @echo off

      \r\n

      plink -ssh myserver.com -P 8080 -D localhost:9000 -l myname -pw mypassword -N

      \r\n
      • \r\n
      • myserver.com : 접속가능한 서버의 도메인 또는 IP\r\n
      • myname : ssh서버 아이디\r\n
      • mypassword : ssh서버 패스워드
      \r\n

      여기서 설정한 localhost:9000 은 myserver.com으로 접속하기 위한 통로입니다. 로컬 PC의 9000번 포트를 이용하여 방화벽을 우회하게 됩니다.

      \r\n
    5. \r\n

      브라우저 설정하기 (IE의 경우)
      인터넷 옵션 => 연결 => LAN설정 => 프록시 서버 체크 => "고 급" 버튼 => Socks : localhost, 포트 : 9000 세팅

      \r\n

      \r\n
    6. \r\n

      접속하기
      위와 같이 설정한 후 myssh.cmd 명령을 실행한 후 브라우저 접속을 해 보면 이전에 접속불가했던 곳에 접속이 가능한 걸 확인할 수 있을 겁니다. 위 socks 프록시 방법을 이용하면 꼭 브라우저만이 아니라 메신저나 기타 프로그램(HTS) 등에서 사용가능합니다.

    \r\n
    \r\n
    \r\n
     
    \r\n

    ----------------------- 명령어 참조 -------------

    \r\n
    \r\n\r\n
    \r\n
    \r\n

    Seemingly simple question, which yields slightly undesired results.

    \r\n

    Execute putty to start a script on a remote linux server which requires user input

    \r\n

    The remote script does a read -p "Please enter name" NAME
    I can use plink to execute a script over SSH, the following attempts and problems are shown below :- Note the -load ns is to load a session that doesnt exist, ie ensure no defaults are used

    \r\n

    1plink.exe -load ns <ip_addr> -l <user> -pw <password> <script path/name> Problem) Doesn't allow/show user input, ie its non-interactive.

    \r\n

    2) Add -t to allocate a pty :-
    plink.exe -t -load nc <ip_addr> -l <user> -pw <password> <script path/name> Problem) Ok, so now the user input can be seen, but I get Ctrl+H (^H) when backspace is pressed, ok if the user doesnt make a mistake!

    \r\n

    3) Use putty instead with a saved session
    putty.exe -load "SavedSession"
    Problem) (a) Get a new window opened, not a biggy, but not as nice. (b) saved session cannot be easily moved(c) Get password prompt, cannot provide password like with plink, I know I know, use keys, but this is a closed, private network, and its easier not to bother with keys!

    \r\n

    So ideally, I would like the SSH to execute in-line, that is from within the batch file/command line shell I am in, not prompt for username/password, run the linux script and allow prompts and delete/backspace to work.

    \r\n

    Many thanks for any ideas/solutions in advance.

    \r\n

     =========

    \r\n
    The latest release version (beta 0.67)
    \r\n

    This will generally be a version we think is reasonably likely to work well. If you have a problem with the release version, it might be worth trying out the latest development snapshot (below) to see if we've already fixed the bug, before reporting it.

    \r\n
    For Windows on Intel x86
    \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
    A .ZIP file containing all the binaries (except PuTTYtel), and also the help files
    \r\n\r\n
    A Windows MSI installer package for everything except PuTTYtel
    \r\n\r\n
    Legacy Inno Setup installer. Reportedly insecure! Use with caution, if the MSI fails.
    \r\n\r\n
    Checksums for all the above files
    \r\n\r\n\r\n\r\n
    ♠ shimss home 는 컴퓨터자료 windows10, server 2012 2016 r2 xpenology WinPE 헤/시놀로지 NAS 그누보드 아미나,APMS 모바일 pc 홈페이지 일상생활 을 위하여 정보를 찾아 공유 합니다.♠ 출처는 링크 참조 바랍니다.♠ https://11q.kr https://11q.kr http://33.iptime.org
    뷰PDF add1,add2



    관련자료



    전체 1,749 / 58 페이지
    전체 1,749 / 58 페이지



    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-05-17 10:43:04

    오늘의 홈 현황


    • 현재 접속자♨ 116 명
    • 오늘 가입자※ 1 명
    • 어제 가입자※ 6 명
    • 주간 가입자※ 11 명
    • 오늘 방문자 838 명
    • 어제 방문자 2,015 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,327,183 명
    • 전체 게시물※ 8,573 개
    • 전체 댓글수※ 24,619 개
    • 전체 회원수 10,971 명

    QR코드


    ☞ QR코드 스캔은 kakao앱 자체 QR코드

    알림 0








    최신글↑