====== Putty ====== * Window/Linux 용 SSH 클라이언트 * 업그레이드가 사실상 중단된 듯. [[windows:ssh:kitty|KiTTY]] 사용. * [[http://www.chiark.greenend.org.uk/~sgtatham/putty/|Putty 홈페이지]] * [[https://blog.splunk.net/wp/64bit-putty/|64bit Putty]] * [[http://kldp.net/projects/iputty|한글 iPutty]] * [[http://etherealmind.com/putty-recomend-default-settings-network-engineer/|Setting the Defaults for PUTTY]] * [[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]] * [[https://documentation.help/PuTTY/|PuTTY User Manual - PuTTY Documentation]] ===== 접속 끊김 방지 ===== * **설정-> 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]] # 명령행을 통해 저장돼 있는 특정 세션에 접속 putty -load "MySessionName" # 특정 세션 접속시 비밀번호 지정 putty -load "MySessionName" -l -pw # 호스트 기준 putty -ssh @somewhere.com -pw putty -ssh somewhere.com -l -pw * ''%%-ssh,-telnet,-rlogin,-raw,-serial%%'' : 접속 프로토콜 ===== Pageant 자동 로그인 ===== * pageant 를 실행하고 개인키를 등록해주면 된다. * 이후부터 pageant를 지원하는 Putty와 plink, TortoisePlink 등을 통해 SSH 접속을 하면 자동 로그인이 된다. * 등록한 개인키는 pageant 를 재시작하면 모두 초기화 된다. * pageant를 시작 프로그래에 등록해서 개인키 등록도 자동으로 하고자 한다면 pageant의 인자로 개인키(private ''.ppk'') 파일을 지정하면된다. 칸의 띄고 여러개 지정해도 된다. C:\Program Files\Putty\pageant.exe C:\path\to\key1.ppk C:\path\to\key2.ppk ===== 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]] plink %user@%proxyhost -P %proxyport -nc %host:%port * [[https://stackoverflow.com/questions/28926612/putty-configuration-equivalent-to-openssh-proxycommand|ssh - PuTTY configuration equivalent to OpenSSH ProxyCommand - Stack Overflow]] ===== PuttyGen ===== * 개인키/공개키를 생성한다. * 혹은 OpenSSH 등에서 생성한 키를 import 하여 Putty 용 키로 변환할 수도 있다. # 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 ===== 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]] plink.exe -N -L 2000:SomeIp:2000 myusername@myLinuxBox ===== 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 ===== * https://github.com/lonepie/putty-quake-console * [[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 ===== * [[http://www.unixmantra.com/2013/07/PuttyCM-alternatives.html|PuttyCM Alternatives]] * [[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]]