사용자 도구

사이트 도구


windows:ssh:putty

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
windows:ssh:putty [2016/10/26 13:56]
kwon37xi
windows:ssh:putty [2022/06/23 23:34] (현재)
kwon37xi [Putty SSH Tunnel]
줄 8: 줄 8:
   * [[http://www.thegeekstuff.com/2008/08/turbocharge-putty-with-12-powerful-add-ons-software-for-geeks-3/|Turbocharge PuTTY with 12 Powerful Add-Ons – Software for Geeks #3]]   * [[http://www.thegeekstuff.com/2008/08/turbocharge-putty-with-12-powerful-add-ons-software-for-geeks-3/|Turbocharge PuTTY with 12 Powerful Add-Ons – Software for Geeks #3]]
   * [[http://www.thegeekstuff.com/2009/03/putty-extreme-makeover-using-putty-connection-manager/|PuTTY: Extreme Makeover Using PuTTY Connection Manager]]   * [[http://www.thegeekstuff.com/2009/03/putty-extreme-makeover-using-putty-connection-manager/|PuTTY: Extreme Makeover Using PuTTY Connection Manager]]
 +  * [[https://documentation.help/PuTTY/|PuTTY User Manual - PuTTY Documentation]]
  
 ===== 접속 끊김 방지  ===== ===== 접속 끊김 방지  =====
   * **설정-> Connection -> Seconds between keep alives**를 0 보다 큰 값으로 설정.   * **설정-> Connection -> Seconds between keep alives**를 0 보다 큰 값으로 설정.
 +
 +
 +===== Password 저장 =====
 +  * putty 는 기본적으로 비밀번호를 UI를 통해 저장할 수 없고, 명령행을 통해서 접속시에만 지정가능함.
 +  * [[https://superuser.com/questions/44106/is-there-a-way-to-auto-login-in-putty-with-a-password|Is there a way to "auto login" in PuTTY with a password? - Super User]]
 +
 +<code sh>
 +# 명령행을 통해 저장돼 있는 특정 세션에 접속
 +putty -load "MySessionName"
 +
 +# 특정 세션 접속시 비밀번호 지정
 +putty -load "MySessionName" -l <username> -pw <password>
 +
 +# 호스트 기준
 +putty -ssh <username>@somewhere.com -pw <password>
 +putty -ssh somewhere.com -l <username> -pw <password>
 +</code>
 +  * ''%%-ssh,-telnet,-rlogin,-raw,-serial%%'' : 접속 프로토콜
  
 ===== Pageant 자동 로그인 ===== ===== Pageant 자동 로그인 =====
줄 16: 줄 35:
   * 이후부터 pageant를 지원하는 Putty와 plink, TortoisePlink 등을 통해 SSH 접속을 하면 자동 로그인이 된다.   * 이후부터 pageant를 지원하는 Putty와 plink, TortoisePlink 등을 통해 SSH 접속을 하면 자동 로그인이 된다.
   * 등록한 개인키는 pageant 를 재시작하면 모두 초기화 된다.   * 등록한 개인키는 pageant 를 재시작하면 모두 초기화 된다.
-  * pageant를 시작 프로그래에 등록해서 개인키 등록도 자동으로 하고자 한다면 pageant의 인자로 개인키(.ppk) 파일을 지정하면된다. 칸의 띄고 여러개 지정해도 된다.+  * pageant를 시작 프로그래에 등록해서 개인키 등록도 자동으로 하고자 한다면 pageant의 인자로 개인키(private ''.ppk'') 파일을 지정하면된다. 칸의 띄고 여러개 지정해도 된다.
  
 +<code>
 +C:\Program Files\Putty\pageant.exe C:\path\to\key1.ppk C:\path\to\key2.ppk
 +</code>
 +===== plink =====
 +  * [[http://www.thegeekstuff.com/2017/05/putty-plink-examples/|10 PuTTY PLINK Examples to Automate Remote Linux Commands from Windows Batch Files]]
  
 +===== plink - proxycmd =====
 +  * putty 를 통한 접속을 plink proxycmd 를 통하게 할 수 있다.
 +  * [[https://stackoverflow.com/a/28937185/1051402|plink를 통한 proxycmd 지정]]
 +    * proxycmd 는 특정 명령을 통해 proxy 서버와의 접속을 생성하고, 실제로 원하는 서버로의 접속을 proxy하게 만든다.
 +  * **Connection -> Proxy -> Local** 에 지정한다.
 +    * **Local Proxy Command**에 아래와 같은 형태로 지정한다.
 +    * ''user'',''proxyhost'', ''proxyport'', ''host'', ''port'' 등은 다른 GUI에서 입력한 프록시 서버 접속정보, 실제 접속 대상 서버 접속 정보 등을 나타낸다.
 +    * [[https://documentation.help/PuTTY/using-cmdline-ncmode.html#S3.8.3.14|-nc: make a remote network connection in place of a remote shell or command - PuTTY Documentation]]
 +<code>
 +plink %user@%proxyhost -P %proxyport -nc %host:%port
 +</code>
 +  * [[https://stackoverflow.com/questions/28926612/putty-configuration-equivalent-to-openssh-proxycommand|ssh - PuTTY configuration equivalent to OpenSSH ProxyCommand - Stack Overflow]]
 ===== PuttyGen ===== ===== PuttyGen =====
   * 개인키/공개키를 생성한다.   * 개인키/공개키를 생성한다.
   * 혹은 OpenSSH 등에서 생성한 키를 import 하여 Putty 용 키로 변환할 수도 있다.   * 혹은 OpenSSH 등에서 생성한 키를 import 하여 Putty 용 키로 변환할 수도 있다.
 +<code sh>
 +
 +# openssh pem to putty ppk
 +puttygen pemKey.pem -o ppkKey.ppk -O private
 +
 +# putty ppk to openssh pem
 +sudo puttygen ppkkey.ppk -O private-openssh -o pemkey.pem
 +</code>
 +
 +===== putty 에서 ppk 직접 사용 =====
 +  * **Connection -> Data -> Auto-login username** 항목에 로그인 username 지정.
 +  * **Connection -> SSH -> Auth -> Private key file or authentication:**에 ''ppk'' key 파일 지정.
 +===== Putty SSH Tunnel =====
 +  * [[https://stackoverflow.com/questions/4974131/how-to-create-ssh-tunnel-using-putty-in-windows|How to create SSH tunnel using PuTTY in Windows? - Stack Overflow]]
 +  * [[https://the.earth.li/~sgtatham/putty/0.71/htmldoc/Chapter7.html|Using the command-line connection tool Plink]]
 +  * [[https://securitymusings.com/article/462/how-to-set-up-a-socks-proxy-using-putty-ssh|How To Set up a SOCKS Proxy Using Putty & SSH - Security Musings]]
 +
 +<code sh>
 +plink.exe -N -L 2000:SomeIp:2000 myusername@myLinuxBox
 +</code>
 +
 +===== Selection Copy & Paste =====
 +  * Linux 에서 사용시 clipoard 와 primary 라는 텍스트 복사/붙여넣기 공간이 존재함.
 +  * **Putty 설정 -> Window -> Selection** 에서 다음 설정을 해줘야 복사/붙여넣기가 올바로 작동한다.
 +    * Mouse paste action: No Action
 +    * {Ctrl,Shift} + Ins: PRIMARY - PRIMARY 복사 붙여넣기
 +    * **%%Ctrl + Shift + {C,V}%%** : CLIPBOARD - 일반 클립보드 복사 붙이넣기
 +{{:windows:ssh:putty-clipboard-selection.png|}}
 +
 +===== Function F1~F12 안먹는 현상 =====
 +  * Linux 용 putty에서 펑션키가 안 작동하면
 +  * **Terminal - Keyboard -> The Function keys and keypad** -> **Xterm R6**
  
 ===== Putty Quake Console ===== ===== Putty Quake Console =====
   * https://github.com/lonepie/putty-quake-console   * https://github.com/lonepie/putty-quake-console
   * [[http://www.autohotkey.com/|AutoHotKey]]를 사용하는 것임   * [[http://www.autohotkey.com/|AutoHotKey]]를 사용하는 것임
 +
 +===== SupperPutty =====
 +  * [[https://github.com/jimradford/superputty|SuperPutty]] : 제일 잘 되는 듯.
 +  * [[https://github.com/jimradford/superputty/wiki/SPSL-Reference-(SuperPuTTY-Scripting-Language)|SuperPuTTY Scripting Language]]
 +
  
 ===== Putty Manager ===== ===== Putty Manager =====
-  * [[https://github.com/jimradford/superputty|SuperPutty]] 
   * [[http://www.unixmantra.com/2013/07/PuttyCM-alternatives.html|PuttyCM Alternatives]]   * [[http://www.unixmantra.com/2013/07/PuttyCM-alternatives.html|PuttyCM Alternatives]]
   * [[https://sourceforge.net/projects/multiputtymanager/|Multi PuTTY Manager]]   * [[https://sourceforge.net/projects/multiputtymanager/|Multi PuTTY Manager]]
 +  * http://www.ttyplus.com/
 +  * https://sourceforge.net/projects/putty-nd/
 +
 +===== 참조 =====
 +  * [[https://winscp.net/eng/docs/guide_tunnel#setting_up_the_tunnel|Connect to FTP/SFTP server which can be accessed via another server only :: WinSCP]]
 +
windows/ssh/putty.1477459607.txt.gz · 마지막으로 수정됨: 2016/10/26 13:56 저자 kwon37xi