sshã使ãããªãããã®7ã¤ã®è¨å®
ãäºæç
ãæãåããªãITç³»æ°å
¥ç¤¾å¡ã«è´ãã·ãªã¼ãºç¬¬1段ã
ã~/.ssh/configã«ã¯ãããããªè¨å®ãæ¸ããããå¨å²ãè¦æ¸¡ããéãããã¾ãæ´»ç¨ããã¦ããããã«ã¯è¦åããããªããããã§ãä»åã¯ä¾¿å©ãªè¨å®ãããã¤ãéãã¦ã¿ãã
é·ããã¹ãåã«çãååãã¤ãã
Host exp1
HostName verrrryyy.looooong.hostname.example.jpãssh verrrryyy.looooong.hostname.example.jpã®ä»£ããã«ssh exp1ã§ãã°ã¤ã³ã§ããããã«ãªãã
ãã¡ãªã¿ã«ãzshã®å ´åãconfigãã¡ã¤ã«ã«ç»é²ããããã¹ãåã¯sshã³ãã³ããæã¤ã¨ãã«è£å®ãããã®ã§æ´ã«ä¾¿å©ã
ç¹å®ã®ãã¹ãã¸ãã°ã¤ã³ããã¨ãã®ã¦ã¼ã¶åãéµãã«ã¹ã¿ãã¤ãºãã
Host github.com
User tkng
IdentityFile ~/.ssh/id_rsa2ãgithubã«ç»é²ãã¦ããéµã¯æ®æ®µä½¿ã奴ã¨éããã ãããã¿ãããªå ´åã«ä½¿ãã
ãããã¾ã§ããã¨å¤§ä½æ³åã¯ã¤ãã ãããããã¼ãçªå·ãªã©ãã«ã¹ã¿ãã¤ãºã§ããã
æ¾ç½®ãã¦ã¦ãåæãããªãããã«ãã
ã10åãããéä¿¡ããã¦ããªãã¨ãã«ã¼ã¿ã¼ãåæã«æ¥ç¶ãåã£ã¦ãã¾ã£ããããã®ã§ããã±ãããéã£ã¦æ¥ç¶ãç¶æããã
ServerAliveInterval 60
ãDebianç³»ã®OSã ã¨ç¬èªã®ããããå½ãã£ã¦ãã¦ProtocolKeepAlivesã¨ããè¨å®ãã§ããã®ã ããServerAliveIntervalã®æ¹ãã©ãã§ã使ãã¦æ±ç¨æ§ãé«ãããã ã使é ããServerAliveIntervalãªãã¦è¨å®ãå¢ãããã ããâ¦ã
ã³ãã¯ã·ã§ã³ãè¤æ°ã®ã¿ã¼ããã«ã§ä½¿ãã¾ãã
Host * ControlMaster auto ControlPath /tmp/%r@%h:%p
ãåä¸ãã¹ãã«è¤æ°ã®ã¿ã¼ããã«ããæ¥ç¶ããå ´åã1æ¬ã®ã³ãã¯ã·ã§ã³ã使ãåãã¦ããããç¹ã«ãã¹ã¯ã¼ããã°ã¤ã³ããã§ããªãå ´åãªã©ã2åç®ä»¥éã¯ãã¹ã¯ã¼ããæããªãã¦è¯ãã®ã§ä¾¿å©ã
æéã®ãããèªè¨¼æ¹æ³ãç¡å¹åãã
Host example1
GSSAPIAuthentication noãå ¬ééµèªè¨¼ã®åã«GSSAPIèªè¨¼ã¨ãããã®ã試ãããã§ãã°ã¤ã³ã«ãããæéããããâ¦ã¿ãããªå ´åã«ãã®è¨å®ãè¡ãã¨ããã£ãã¨å ¬ééµèªè¨¼ããã¦ãããããã«ãªã£ã¦ã¤ãªããã¾ã§ã®æéãçããªãã
夿®µãã°ã¤ã³ã®è¨å®
ã前に書いたã®ã§ãã¡ããåç
§ã
ãProxyCommandã使ããçè«ä¸ã¯ç¡éã«å¤æ®µãã°ã¤ã³ãã§ããã
SOCKSãããã·æ©è½ãæä¾ãã
ãDynamic Port Fowardã使ã£ã¦ãç¹å®ãã¹ãã¸ã®ã¢ã¯ã»ã¹ï¼ãã¼ãã§èå¥ããããããªãããã¹ãåã§èå¥ããã¨ããããã¤ã³ãï¼ã ããsshã®ãã³ãã«çµç±ã§ã¢ã¯ã»ã¹ããããã¨ãã§ãããããã前に書いたãåã«æ¸ããã¨ãã«ã¯Google Chromeã¯å¯¾å¿ãã¦ãªãã£ããã©ãããä»ã§ã¯å®ç§ã«å¯¾å¿ãã¦ããã
ãWeb APIãéçºãã¦ããæã¨ãããã©ã¦ã¶ããã¡ããã¨ãã¹ãã§ããã¨ããã便å©ã
ã¾ã¨ã
ãsshã¯ä¾¿å©ãªãã®ã¨ããããã¯ãªãã¦ã¯ãªããªãä»äºã®å¿
éåã¿ãããªãã®ã§ãããããã¤ãªãããããããã¨ããæãã§ãéè¦åº¦ã®å²ã«ãã¾ãé¡§ã¿ããã¦ããªããããªæ°ããã¦ãããæ¯æ¥ä½¿ããã®ã ãããããã¡ãã£ã¨ããé¢åãè¨å®ã§åé¿ã§ããã®ã§ããã°ããã²åé¿ãã¦ãããããã®ã§ããã
ãWindows使ã£ã¦ã人ã¯ããããããªãã®ã§ããããªãããã