è¸ã¿å°ãå¿ããããã®sshã³ãã³ã or config
ä»åã¯ãä¸ã
è¸ã¿å°ãªãã¦è¡ã£ã¦ãããã¼ãï¼ãã£ã¦äººã®ããã®Tipsãã¾ã¨ãã¦è¦ã¾ããã
å
容çã«ã¯ãã®ãããæ¢è¦æããã¨æãã¾ãã
.ssh/configã®è¨å®
ã³ãã³ãã©ã¤ã³ãããµã¼ãã¼ã«ãã°ã¤ã³ããæã£ã¦ã大æµã¯
$ ssh oreore@fumidai
ã£ã¦ãã£ã¦ãã
[oreore@fumidai ~]$ ssh oreore@mokutekino-server
ã¨ããã£ã¦ããã¨æãã¾ããã§ãããã ã¨æåãé·ãããã³ãã³ãã2åå©ããªãã¨è¡ããªãã®ã§ç°¡ç¥åãã¾ãããã
ã¾ãããã¼ã«ã«ç°å¢ã®~/.sshã«ç§»åãã¦ããããconfigãã¡ã¤ã«ãä½æãã¾ãããã
$ cd ~/.ssh $ vi config
ããã¦ä»¥ä¸ã®ããã«å ¥åãã¾ãã
# è¸ã¿å°ãµã¼ãã¼ Host fumidai HostName fumidai Port 22 User oreore # èªåã®ã¦ã¼ã¶ã¼åã¨å ¥ãæ¿ã IdentityFile ~/.ssh/id_rsa # èªåã®ãã¼ã«ã«ã®éµã¨å ¥ãæ¿ã # è¸ã¿å°å¾ã«å ¥ããããµã¼ãã¼ Hostã¯é©å½ã«æ¸ãæãã Host mokutekino-server HostName mokutekino-server User root Port 22 ProxyCommand ssh -W %h:%p fumidai
ãããä¿åãã¿ã¼ããã«ã§ä»¥ä¸ã®ç¨ã«å ¥åããã¨å ¥ãã¾ãã
$ ssh mokutekino-server [root@mokutekino-server ~]#
netcatã使ãæ¹æ³ãããããã§ãããä»ã¯ssh -Wãªãã·ã§ã³ã ãã§ãããããã§ãã
ç°¡åã§ããã
ãã®ä»ã³ãã³ãã§ä¸çºã§å ¥ã
ãããªããã
$ ssh -t fumidai âssh root@mokutekino-serverâ
ãããªãã§ãä¸çºã§ç®çã®ãµã¼ãã¼ã«å ¥ãã¾ãã
$ ssh -oProxyCommand=âssh -W %h:%p fumidaiâ root@mokutekino-server
â»configã§fumidaiãè¨å®ãã¦ããå ´åãæ³å®
ä¾ãã°sshã§ãã°ã ãè¦ãã
$ ssh -oProxyCommand=âssh -W %h:%p fumidaiâ root@mokutekino-server âtail -f /var/log/yourappname/httpd/access.logâ
ãããªæãã§ãç´ã§ãã°ããã¤ã«ã§ãã¾ãã
ãã¼ã«ã«ã§ã®shellscriptã§ã¢ã¯ã»ã¹è§£æã¨ããããã¨ããªã©ãæ´»ç¨ã§ããã®ã§ã¯ãªãã§ããããï¼ï¼ãããããããªããã©
ã¾ã¨ã
ã¾ãèªåç¨ã®ã¡ã¢ã§ããã
ããããconfigã¯ãã¼ã ã§å ±æãã¦ããã¨æãããã§ããã
ã§ã¯ã§ã¯