GitHub Enterprise Cloudã¯ãSSHè¨¼ææ¸ããµãã¼ãããããã«ãªãã¾ãããããã«ããã伿¥ãçµç¹ã¯æå±ããã¡ã³ãã¼ããªãã¸ããªã«ã¢ã¯ã»ã¹ããæ¹æ³ãããé«åº¦ã«ã³ã³ããã¼ã«ã§ãã¾ããSSHè¨¼ææ¸ã§ã¯ãããSSHãã¼(èªè¨¼å±)ã§å¥ã®SSHãã¼ã«ç½²åã§ãããã¼ã®ææè ã§ããéçºè ã®æ å ±ãå«ã¾ãã¾ãã管çè ã¯SSHèªè¨¼å±(CA)ã®å ¬ééµãã¢ãããã¼ããã¦ãã¡ã³ãã¼ãGitã®èªè¨¼ã«ä½¿ç¨ããè¨¼ææ¸ã®çºè¡ãéå§ã§ãã¾ããè¨¼ææ¸ã¯ã伿¥ã¾ãã¯çµç¹ã«å±ãããªãã¸ããªã¸ã®ã¢ã¯ã»ã¹ã®ã¿ã«ä½¿ç¨ã§ãã¾ããã¾ãã管çè ã¯ããªãã¸ããªã¸ã®ã¢ã¯ã»ã¹æã«è¨¼ææ¸ã®ä½¿ç¨ãå¿ é ã«ã§ãã¾ãã
SSHãã¼ã¨ã®ç¸éç¹
SSHè¨¼ææ¸ã¨SSHãã¼ã¨ç¸éç¹ã«ã¤ãã¦èª¬æãã¾ããGitHubã§ã¯ãå½åããSSHãã¼ããµãã¼ããã¦ãã¾ããããã¯ãåã ã®ã¦ã¼ã¶ã¼ãå®å ¨ã«èå¥ããæå·ãã¼Â  ã§ãããã®ä¸æ¹ã§ãSSHã«ã¯SSHè¨¼ææ¸ã®ãµãã¼ããå®ç¾©ãã仿§ãããã¾ããSSHè¨¼ææ¸ã§ã¯ãããSSHãã¼ã§å¥ã®SSHãã¼ã«ç½²åã§ãã¾ãããã®çµæ”SSHè¨¼ææ¸”ãçæããã¾ããCAãä¿¡é ¼ãããµã¼ãã¼ã¯ãè¨¼ææ¸ã®ç½²åãæ¤è¨¼ãã¦ãè¨¼ææ¸ããã³ãã®é¢é£ã¡ã¿ãã¼ã¿ãä¿¡é ¼ã§ãã¾ãã
åä½ã®ä»çµã¿
SSHè¨¼ææ¸ã ã©ã®ããã«åä½ããã©ã®ããã«ããé«åº¦ãªç®¡çãå®ç¾ã§ããã®ããçè§£ããããã«ãããçµç¹ãCAãã»ããã¢ãããã¦ãã¼ã«ç½²åããæé ãè¦ã¦ã¿ã¾ããããå伿¥ã«ãããè¨å®ããã»ã¹ã¯ãã»ã¨ãã©åãã§ãã
åãã«ãçµç¹ã®ç®¡çè ã¯SSH CAãã¼ãã¢ãããã¼ããã¾ããããã¯é常ã®SSHãã¼ã§ãã
â ssh-keygen -t ed25519 -C [email protected] -f ca
â cat ca.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOixUTX9ssW7bAaO6wTxXxJGRpVWNnqnOFwFZ1ceOxVn [email protected]
ã¦ã¼ã¶ã¼ã®é常ã®SSHãã¼ã®å ´åã¨åæ§ã®æ¹æ³ã§å ¬ééµãã¢ãããã¼ããã¾ãããã ããããã§ã¯å ¬ééµãçµç¹ã®”SSHèªè¨¼å±”è¨å®ãã¼ã¸ã«ã¢ãããã¼ããã¾ãã
注ï¼ãªãã¸ããªã¸ã®ã¢ã¯ã»ã¹ã«SSHè¨¼ææ¸ãå¿
é ã¨ãããã¨ãã§ãã¾ã ãããã«ããã管çè
ã¯ãªãã¸ããªã¸ã®ã¢ã¯ã»ã¹ã«ä½¿ç¨ã§ãããã¼ã«ã¤ãã¦ããã詳細ã«ç®¡çã§ãã¾ããã¢ãããã¼ããå®äºããããåã¡ã³ãã¼ã®SSHãã¼ç®¡çãã¼ã¸ã«æ°ããã»ã¯ã·ã§ã³ã追å ãããåèªãæå±ãã伿¥ããã³çµç¹ã§SSH CAãè¨å®æ¸ã¿ã§ãããã¨ã表示ããã¾ãã

SSH CAã追å ããããçµç¹ã®ãªãã¸ããªã«ã¢ã¯ã»ã¹ããããã®è¨¼ææ¸ãçºè¡ã§ãã¾ããåããããã説æããããã«ãä¾ã¨ãã¦ã¦ã¼ã¶ã¼ã®é常ã®SSHãã¼ã使ç¨ãã¾ãã
â ssh-keygen -t ed25519 -C [email protected] -f user1
â cat user1.pub
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGN4i6n6N2jdOXM1RUhLIcww1RnO6QaE3psgUXLewash [email protected]
ãã®ãã¼ã¯SSH CAã«ããç½²åãå¯è½ã§ããç½²åã«ãã£ã¦ãçµç¹ææã®ãªãã¸ããªã¸ã®ã¢ã¯ã»ã¹ã«ä½¿ç¨ããè¨¼ææ¸ã使ããã¾ãã
â ssh-keygen -O extension:[email protected]=user1 -s ca -V '+1d' -I [email protected] -n user1 user1.pub
Signed user key user1-cert.pub: id "[email protected]" serial 0 for user1 valid from 2019-08-09T12:26:00 to 2019-08-10T12:27:43
çµç¹ã®ãªãã¸ããªã«ã¢ã¯ã»ã¹ããããã«ãåéçºè ã®åå¥ã®SSHãã¼ãã¢ãããã¼ãããå¿ è¦ã¯ããã¾ããã SSHãã¼ãCAãã¼ã§ç½²åãããã¨ããã®çµæçæãããè¨¼ææ¸ã使ç¨ãã¦çµç¹ã®ãªãã¸ããªã¸ã®ã¢ã¯ã»ã¹ãèªè¨¼ã§ãã¾ããGitHubã¯ãå¿ é é ç®ã®â[email protected]âè¨¼ææ¸ã¨ã¯ã¹ãã³ã·ã§ã³ã«åºã¥ãã¦ããªãã¸ããªã«ã¢ã¯ã»ã¹ãã¦ããéçºæ å½è  ãèå¥ãã¾ãã
SSHè¨¼ææ¸ã使ç¨ãããã¨ã§ã1æ¥ã§æéãåããè¨¼ææ¸ãªã©ã®é«åº¦ãªã»ãã¥ãªãã£ããªã·ã¼ãç¶æã§ãã¾ãããã®ä¾ã§ä½æããè¨¼ææ¸ã¯ãæå¹æéã1æ¥ã§ããã¾ããå é¨ã·ã¹ãã ãè¨¼ææ¸ãçºè¡ããæ©è½ãæã¤æ¢åã®ã½ãªã¥ã¼ã·ã§ã³ããæ¯æè¨¼ææ¸ãéçºè ãåå¾ãããã¨ãã£ãå®å ¨æ§ã®é«ãã¯ã¼ã¯ããã¼ãæ§ç¯ãããã¨ãå¯è½ã«ãªãã¾ãã
ãã®ã·ã¹ãã ã«å¯¾ãã¦ãçµç¹å ã§å¿ è¦ã¨ãããèªè¨¼æ¹å¼ãå®è£ ãããã¨ãã§ããçæãããè¨¼ææ¸ã¯ãã®æ¥ã«éçºè ãGitHub.comä¸ã§è¡ãå ¨ã¦ã®ä½æ¥ã«ä½¿ç¨ãããã¨ãã§ãã¾ãã
ããã¦ããã®æ¥ã®çµããã«Â è¨¼ææ¸ã®æéãèªåçã«åãã¦ãéçºæ å½è  ã¯çµç¹ã®ãã¹ã¦ã®ãªãã¸ããªã«ã¢ã¯ã»ã¹ã§ããªããªãã¾ãã
ããã¯ãã»ãã¥ãªãã£ãç¹ã«éè¦ããä¸çåå½ã®éçºè  ããå¼·ãè¦æããã£ãæ©è½ã§ããç§ãã¡ã¯ããããã®ãã¼ã ã®çæ§ãããã¦GitHub Enterpriseããå©ç¨ã®ãã¹ã¦ã®ãã¼ã ã«ãã³ã¼ãã®ä¿è·æ¹æ³ã®é¸æè¢ãããå¤ãæä¾ã§ãããã¨ãå¬ããæãã¾ããä»å¾ãææ°æ å ±ã常ã«ã確èªãã ãããè¿æ¥ä¸ã«ãEnterprise Serveråãã®SSHè¨¼ææ¸èªè¨¼ã®ãµãã¼ããéå§ããäºå®ã§ãã
GitHub Enterpriseåãè¨¼ææ¸èªè¨¼ã®è©³ç´°ã«ã¤ãã¦ã¯ãã¡ã