15.10. OpenSSH

´ó¹Æ: Chern Lee.

¥»¥­¥å¥¢¥·¥§¥ë (secure shell) ¤Ï¥ê¥â¡¼¥È¥Þ¥·¥ó¤Ø¤Î¥»¥­¥å¥¢¤Ê¥¢¥¯¥»¥¹¤Ë»È¤ï¤ì¤ë¥Í¥Ã¥È¥ï¡¼¥¯Àܳ¥Ä¡¼¥ë¤Î½¸¹ç¤Ç¤¹¡£ ¤³¤ì¤Ï rlogin, rsh, rcp, telnet ¤ò¤½¤Î¤Þ¤ÞÃÖ¤­´¹¤¨¤Æ»È¤¨¤Þ¤¹¡£ ¤Þ¤¿¡¢Â¾¤Î¤¢¤é¤æ¤ë TCP/IP Àܳ¤ò ssh ·Ðͳ¤Ç¥»¥­¥å¥¢¤Ë¥È¥ó¥Í¥ë/¥Õ¥©¥ï¡¼¥É¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ ssh ¤Ï¤¹¤Ù¤Æ¤Î¥È¥é¥Õ¥£¥Ã¥¯¤ò°Å¹æ²½¤·¡¢ ÅðÄ°¤äÀܳ¤Î¾è¤Ã¼è¤êÅù¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥ì¥Ù¥ë¤Î¹¶·â¤ò»ö¼Â¾å̵¸ú²½¤·¤Þ¤¹¡£

OpenSSH ¤Ï OpenBSD ¥×¥í¥¸¥§¥¯¥È¤Ë¤è¤Ã¤Æ°Ý»ý´ÉÍý¤µ¤ì¤Æ¤ª¤ê¡¢SSH v1.2.12 ¤ËºÇ¿·¤Î¤¹¤Ù¤Æ¤Î¥Ð¥°½¤Àµ¤È¹¹¿·¤òŬÍѤ·¤¿¤â¤Î¤ò¥Ù¡¼¥¹¤Ë¤·¤Æ¤¤¤Þ¤¹¡£ OpenSSH ¥¯¥é¥¤¥¢¥ó¥È¤Ï SSH ¥×¥í¥È¥³¥ë 1 ¤È 2 ¤ÎξÊý¤Ë¸ß´¹À­¤¬¤¢¤ê¤Þ¤¹¡£ OpenSSH ¤Ï FreeBSD 4.0 °Ê¹ß¥Ù¡¼¥¹¥·¥¹¥Æ¥à¤Ë¼è¤ê¹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£

15.10.1. OpenSSH ¤ò»È¤¦¤³¤È¤ÎÍøÅÀ

telnet(1) ¤ä rlogin(1) ¤ò»È¤¦¾ì¹ç¡¢°ìÈ̤˥ǡ¼¥¿¤Ï¥Í¥Ã¥È¥ï¡¼¥¯¤òʿʸ¤Çή¤ì¤Þ¤¹¡£ ¥Í¥Ã¥È¥ï¡¼¥¯¤ò¥¯¥é¥¤¥¢¥ó¥È¤È¥µ¡¼¥Ð¤Î´Ö¤Î¤É¤³¤«¤ÇÅðÄ°¤¹¤ë¤³¤È¤Ç ¤¢¤Ê¤¿¤Î¥æ¡¼¥¶/¥Ñ¥¹¥ï¡¼¥É¾ðÊó¤ä¥»¥·¥ç¥óÃæ¤òή¤ì¤ë¥Ç¡¼¥¿¤òÅð¤à¤³¤È¤¬²Äǽ¤Ç¤¹¡£ OpenSSH ¤Ï¤³¤ì¤é¤òͽËɤ¹¤ë°Ù¤Ë¤µ¤Þ¤¶¤Þ¤Êǧ¾Ú¤È°Å¹æ²½¤ÎÊýË¡¤òÄ󶡤·¤Þ¤¹¡£

15.10.2. sshd ¤òÍ­¸ú¤Ë¤¹¤ë

rc.conf ¥Õ¥¡¥¤¥ë¤Ë °Ê²¼¤Î¹Ô¤òÄɲ䷤Ƥ¯¤À¤µ¤¤¡£

sshd_enable="YES"

¼¡¤Ëµ¯Æ°¤·¤¿¤È¤­¤«¤é ssh ¥Ç¡¼¥â¥ó¤¬µ¯Æ°¤·¤Þ¤¹¡£ ¤â¤·¤¯¤Ïñ¤Ë sshd ¥Ç¡¼¥â¥ó¤ò¼Â¹Ô¤·¤Æ¤â¹½¤¤¤Þ¤»¤ó¡£

15.10.3. SSH ¥¯¥é¥¤¥¢¥ó¥È

ssh(1) ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï rlogin(1) ¤ÈƱÍͤËƯ¤­¤Þ¤¹¡£

# ssh user@example.com
Host key not found from the list of known hosts.
Are you sure you want to continue connecting (yes/no)? yes
Host 'example.com' added to the list of known hosts.
user@example.com's password: *******

¥í¥°¥¤¥ó¤Ï rlogin ¤ä telnet ¤Ç¥»¥Ã¥·¥ç¥ó¤òÄ¥¤Ã¤¿»þ¤ÈƱÍͤ˳¤­¤Þ¤¹¡£ SSH ¤Ï¥¯¥é¥¤¥¢¥ó¥È¤¬Àܳ¤·¤¿»þ¡¢ ¥µ¡¼¥Ð¤Î¿®ÍêÀ­¤Î¸¡¾Ú¤Î¤¿¤á¤Ë¸°»ØÌ楷¥¹¥Æ¥à (key fingerprint system) ¤òÍøÍѤ·¤Þ¤¹¡£ ½é¤á¤Æ¤ÎÀܳ¤ÎºÝ¤Ë¤Î¤ß¡¢¥æ¡¼¥¶¤Ï yes ¤ÈÆþÎϤ¹¤ë¤³¤È¤òÍ׵ᤵ¤ì¤Þ¤¹¡£ ¤³¤ì°Ê¹ß¤Î login ¤Ç¤ÏÊݸ¤µ¤ì¤Æ¤¤¤¿¸°»ØÌæ¤ò¾È¹ç¤¹¤ë¤³¤È¤Ç¸¡¾Ú¤µ¤ì¤Þ¤¹¡£ SSH ¥¯¥é¥¤¥¢¥ó¥È¤ÏÊݸ¤µ¤ì¤Æ¤¤¤¿¸°»ØÌ椬 login ¤·¤è¤¦¤È¤·¤¿ºÝ¤ËÁ÷¤é¤ì¤Æ¤­¤¿¤â¤Î¤È°Û¤Ê¤Ã¤Æ¤¤¤¿¾ì¹ç¤Ë¤Ï·Ù¹ð¤òɽ¼¨¤·¤Þ¤¹¡£ »ØÌæ¤Ï ~/.ssh/known_hosts ¤Ë¡¢¤Þ¤¿ SSH v2 »ØÌæ¤Î¾ì¹ç¤Ï ~/.ssh/known_hosts2 ¤ËÊݸ¤µ¤ì¤Þ¤¹¡£

¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢OpenSSH ¥µ¡¼¥Ð¤Ï SSH v1 ¤È SSH v2 ξÊý¤ÎÀܳ¤ò¼õ¤±ÉÕ¤±¤ë¤è¤¦¤ËÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£ ¥¯¥é¥¤¥¢¥ó¥È¤Ï¤½¤Î¤É¤Á¤é¤«¤òÁªÂò¤Ç¤­¤Þ¤¹¡£ ¥Ð¡¼¥¸¥ç¥ó 2 ¤Ï¡¢µì¥Ð¡¼¥¸¥ç¥ó¤è¤ê¤â·ø¸Ç¤Ç°ÂÁ´¤Ç¤¹¡£

ssh ¤Ë¡¢¥×¥í¥È¥³¥ë v1 ¤È v2 ¤Ë¤Ä¤¤¤Æ¤½¤ì¤¾¤ì¡¢°ú¿ô -1 ¤Þ¤¿¤Ï -2 ¤òÅϤ¹¤³¤È¤Ç¡¢ÍøÍѤ¹¤ë¥×¥í¥È¥³¥ë¤ò¶¯À©¤Ç¤­¤Þ¤¹¡£

15.10.4. Secure copy

scp ¥³¥Þ¥ó¥É¤Ï rcp ¤ÈƱÍͤËƯ¤­¤Þ¤¹¡£ °ÂÁ´¤ÊÊýË¡¤Ç¹Ô¤Ã¤Æ¤¤¤ë¤Û¤«¤Ï¡¢¥í¡¼¥«¥ë¤Î¥Õ¥¡¥¤¥ë¤ò¥ê¥â¡¼¥È¥Þ¥·¥ó¤Ø¡¢ ¤¢¤ë¤¤¤Ï¥ê¥â¡¼¥È¥Þ¥·¥ó¤Î¥Õ¥¡¥¤¥ë¤ò¥í¡¼¥«¥ë¤Ë¥³¥Ô¡¼¤¹¤ë¤Î¤ÏƱ¤¸¤Ç¤¹¡£

# scp user@example.com:/COPYRIGHT COPYRIGHT
user@example.com's password: *******
COPYRIGHT            100% |*****************************|  4735
00:00
#

Á°²ó¤ÎÎã¤Ç¤³¤Î¥Û¥¹¥È¤Î»ØÌ椬¤¹¤Ç¤ËÊݸ¤µ¤ì¤Æ¤¤¤ì¤Ð ¤³¤Î scp ¤ò»È¤¦»þ¤Ë¸¡¾Ú¤¬¹Ô¤Ê¤ï¤ì¤Þ¤¹¡£

scp ¤ËÅϤµ¤ì¤ë°ú¿ô¤Ï¡¢cp ¤Î¤â¤Î¤È»÷¤Æ¤ª¤ê¡¢¥Õ¥¡¥¤¥ë (1 ¤Ä¤Þ¤¿¤ÏÊ£¿ô) ¤¬ 1 ¤Ä¤á¤Î°ú¿ô¤Ë¤Ê¤ê¡¢¥³¥Ô¡¼À褬 2 ¤Ä¤á¤Î°ú¿ô¤Ë¤Ê¤ê¤Þ¤¹¡£ ¥Õ¥¡¥¤¥ë¤Ï¥Í¥Ã¥È¥ï¡¼¥¯±Û¤·¤Ë SSH ¤òÄ̤·¤ÆÁ÷¤é¤ì¤ë¤Î¤Ç¡¢ °ú¿ô¤Ë»ØÄꤹ¤ë¥Õ¥¡¥¤¥ë¤Ë¤Ï user@host:<path_to_remote_file> ¤È¤¤¤¦·Á¼°¤ò¤È¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£

15.10.5. ÀßÄê

¥·¥¹¥Æ¥àÁ´ÂΤÎÀßÄê¥Õ¥¡¥¤¥ë¤Ï¡¢OpenSSH ¥Ç¡¼¥â¥ó¡¢ ¥¯¥é¥¤¥¢¥ó¥È¤ÎξÊý¤È¤â /etc/ssh ¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ê¤Þ¤¹¡£

ssh_config ¤Ï¥¯¥é¥¤¥¢¥ó¥È¤ÎÆ°ºîÀßÄê¡¢ sshd_config ¤Ï¥Ç¡¼¥â¥ó¤ÎÆ°ºîÀßÄê¤ò¹Ô¤Ê¤¤¤Þ¤¹¡£

¤µ¤é¤Ë¡¢rc.conf ¥ª¥×¥·¥ç¥ó¤Î sshd_program (¥Ç¥Õ¥©¥ë¥È¤Ï /usr/sbin/sshd) ¤È sshd_flags ¤Ë¤è¤ê¡¢¾ÜºÙ¤ÊÀßÄ꤬¹Ô¤¨¤Þ¤¹¡£

15.10.6. ssh-keygen

¥Ñ¥¹¥ï¡¼¥É¤ÎÂå¤ï¤ê¤Ë ssh-keygen(1) ¤ò»È¤Ã¤Æ¥æ¡¼¥¶¤Îǧ¾ÚÍѤΠRSA °Å¹æ¸°¤òºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

% ssh-keygen
Initializing random number generator...
Generating p:  .++ (distance 66)
Generating q:  ..............................++ (distance 498)
Computing the keys...
Key generation complete.
Enter file in which to save the key (/home/user/.ssh/identity):
Enter passphrase:
Enter the same passphrase again:
Your identification has been saved in /home/user/.ssh/identity.
...

ssh-keygen(1) ¤Ïǧ¾Ú¤Ë»È¤¦°Ù¤Î¸ø³«¸°¤ÈÈëÌ©¸°¤Î¥Ú¥¢¤òºî¤ê¤Þ¤¹¡£ ÈëÌ©¸°¤Ï ~/.ssh/identity ¤ËÊݸ¤µ¤ì¡¢ ¸ø³«¸°¤Ï ~/.ssh/identity.pub ¤ËÊݸ¤µ¤ì¤Þ¤¹¡£ ¸ø³«¸°¤Ï¥ê¥â¡¼¥È¥Þ¥·¥ó¤Î ~/.ssh/authorized_keys ¤Ë¤âÃÖ¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£

¤³¤ì¤Ç¥Ñ¥¹¥ï¡¼¥É¤ÎÂå¤ï¤ê RSA ǧ¾Ú¤ò»È¤Ã¤Æ¥ê¥â¡¼¥È¥Þ¥·¥ó¤ËÀܳ¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¤Ï¤º¤Ç¤¹¡£

ssh-keygen(1) ¤Ç¥Ñ¥¹¥Õ¥ì¡¼¥º¤ò»È¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢ ¥æ¡¼¥¶¤ÏÈëÌ©¸°¤ò»È¤¦¤¿¤á¤ËËè²ó¥Ñ¥¹¥Õ¥ì¡¼¥º¤ÎÆþÎϤò¹Ô¤Ê¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£

Ʊ¤¸ÌÜŪ¤Ç¡¢ssh-keygen -d (FreeBSD FreeBSD-CURRENT ¤Ç¤Ï ssh-keygen -t dsa) ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ SSH v2 DSA ¸°¤òÀ¸À®¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ ¤³¤ì¤Ï¡¢SSH v2 ¥»¥Ã¥·¥ç¥óÀìÍѤΠDSA ¸ø³«/ÈëÌ©¸°¤òÀ¸À®¤·¤Þ¤¹¡£ ¸ø³«¸°¤Ï ~/.ssh/id_dsa.pub ¤ËÊݸ¤µ¤ì¡¢ÈëÌ©¸°¤Ï ~/.ssh/id_dsa ¤ËÃÖ¤«¤ì¤Þ¤¹¡£

DSA ¸ø³«¸°¤Ï¥ê¥â¡¼¥È¥Þ¥·¥ó¤Î ~/.ssh/authorized_keys2 Æâ¤Ë¤ª¤­¤Þ¤¹¡£

ssh-agent(1) ¤È ssh-add(1) ¤Ï Ê£¿ô¤Î¥Ñ¥¹¥ï¡¼¥É²½¤µ¤ì¤¿ÈëÌ©¸°¤Î´ÉÍý¤Ë»È¤ï¤ì¤Þ¤¹¡£

15.10.7. SSH ¥È¥ó¥Í¥ê¥ó¥°

OpenSSH ¤Ï°Å¹æ²½¤µ¤ì¤¿¥»¥Ã¥·¥ç¥ó¤ÎÃæ¤Ë¾¤Î¥×¥í¥È¥³¥ë¤ò ¥«¥×¥»¥ë²½¤¹¤ë¥È¥ó¥Í¥ë¤òºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

°Ê²¼¤Î¥³¥Þ¥ó¥É¤Ï ssh(1) ¤Ç telnet ÍѤΥȥó¥Í¥ë¤òºîÀ®¤·¤Þ¤¹¡£

% ssh -2 -N -f -L 5023:localhost:23 user@foo.example.com
%

ssh ¥³¥Þ¥ó¥É¤Ï¡¢ ¼¡¤Î¥ª¥×¥·¥ç¥ó¤È¤È¤â¤ËÍøÍѤ·¤Þ¤¹¡£

-2

ssh ¤Ë¥×¥í¥È¥³¥ë¥Ð¡¼¥¸¥ç¥ó 2 ¤ò»È¤¦¤³¤È¤ò»Ø¼¨¤·¤Þ¤¹¡£(¸Å¤¤ ssh ¥µ¡¼¥Ð¤ò»È¤Ã¤Æ¤¤¤ë¤È¤­¤Ë¤Ï»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤)

-N

¤Ï¥È¥ó¥Í¥ë¤À¤±¤Ç¥³¥Þ¥ó¥É¤Ï¤Ê¤¤¤³¤È¤ò¼¨¤·¤Þ¤¹¡£ ¾Êά¤µ¤ì¤ë¤È ssh(1) ¤ÏÄ̾ï¤Î¥»¥Ã¥·¥ç¥ó¤ò³«»Ï¤·¤Þ¤¹¡£

-f

ssh ¤Ë¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¼Â¹Ô¤ò¶¯À©¤·¤Þ¤¹¡£

-L

¥í¡¼¥«¥ë¥È¥ó¥Í¥ë¤ò localport:remotehost:remoteport ¤È¤¤¤¦·Á¼°¤Ç»ØÄꤷ¤Þ¤¹¡£

user@foo.example.com

¥ê¥â¡¼¥È¤Î SSH ¥µ¡¼¥Ð¤Ç¤¹¡£

SSH ¤Î¥È¥ó¥Í¥ë¤Ï localhost ¤Î»ØÄꤵ¤ì¤¿¥Ý¡¼¥È¤Ë listen ¤¹¤ë¥½¥±¥Ã¥È¤òºî¤ë¤³¤È¤Ç¼Â¸½¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ SSH ¤Ï¥í¡¼¥«¥ë¤Î¥Û¥¹¥È/¥Ý¡¼¥È¤Ç¼õ¤±¤¿Àܳ¤¹¤Ù¤Æ¤ò SSH Àܳ·Ðͳ¤Ç»ØÄꤵ¤ì¤¿¥ê¥â¡¼¥È¥Û¥¹¥È¤Î¥Ý¡¼¥È¤ØžÁ÷¤·¤Þ¤¹¡£

¤³¤ÎÎã¤Ç¤Ï¡¢localhost ¤Î¥Ý¡¼¥È 5023 ¤¬¥ê¥â¡¼¥È¥Þ¥·¥ó¤Î localhost ¤Î¥Ý¡¼¥È 23 ¤ËžÁ÷¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ 23 ¤Ï telnet ¤Ê¤Î¤Ç¤³¤ì¤Ï SSH ¥È¥ó¥Í¥ë¤òÄ̤륻¥­¥å¥¢¤Ê telnet ¥»¥Ã¥·¥ç¥ó¤òºî¤ê¤Þ¤¹¡£

¤³¤Î¤è¤¦¤Ë¤·¤Æ SMTP ¤ä POP3, FTP Åù¤Î¥»¥­¥å¥¢¤Ç¤Ï¤Ê¤¤ TCP ¥×¥í¥È¥³¥ë¤ò¥«¥×¥»¥ë²½¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

例 15-1. SSH ¤òÍѤ¤¤¿ SMTP ÍѤΰÂÁ´¤Ê¥È¥ó¥Í¥ë¤ÎºîÀ®

% ssh -2 -N -f -L 5025:localhost:25 user@mailserver.example.com

user@mailserver.example.com's password: *****
% telnet localhost 5025
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mailserver.example.com ESMTP

ssh-keygen(1) ¤ÈÊ̤Υ桼¥¶¥¢¥«¥¦¥ó¥È¤òÁȤ߹ç¤ï¤»¤Æ»È¤¦¤³¤È¤Ç¤è¤êÆ©²áŪ¤ÇǺ¤Þ¤º¤ËºÑ¤à¤è¤¦¤Ê SSH ¤Î¥È¥ó¥Í¥ë´Ä¶­¤òºî¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¥Ñ¥¹¥ï¡¼¥É¤òÆþÎϤ¹¤ë¤È¤³¤í¤Ç°Å¹æ¸°¤ò»È¤¤¡¢ ¥È¥ó¥Í¥ë¤ÏÊ̤Υ桼¥¶¸¢¸Â¤Ç¼Â¹Ô¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£

15.10.7.1. ¼ÂÍÑŪ¤Ê SSH ¥È¥ó¥Í¥ë¤ÎÎã

15.10.7.1.1. POP3 ¥µ¡¼¥Ð¤Ø¤Î°ÂÁ´¤ÊÀܳ

»Å»ö¤Ç¡¢³°Éô¤«¤é¤ÎÀܳ¤ò¼õ¤±¤ë SSH ¥µ¡¼¥Ð¤¬¤¢¤ë¤È¤·¤Þ¤¹¡£ Ʊ¤¸¥ª¥Õ¥£¥¹¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¤Ï¡¢POP3 ¥µ¡¼¥Ð¤¬Æ°¤¤¤Æ¤¤¤ë¥á¡¼¥ë¥µ¡¼¥Ð¤¬¤¢¤ë¤È¤·¤Þ¤¹¡£ ¥Í¥Ã¥È¥ï¡¼¥¯¤â¤·¤¯¤Ï¤¢¤Ê¤¿¤Î²È¤È¥ª¥Õ¥£¥¹¤Î´Ö¤Î¥Í¥Ã¥È¥ï¡¼¥¯·ÐÏ©¤Ï¡¢ ´°Á´¤Ë¿®Íê¤Ç¤­¤ë¤â¤Î¤«¤â¤·¤ì¤Þ¤»¤ó¤·¡¢¤½¤¦¤Ç¤Ï¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£ ¤½¤Î¤¿¤á¡¢ÅŻҥ᡼¥ë¤Ï°ÂÁ´¤Ê¤ä¤êÊý¤Ç¸«¤ë¤è¤¦¤Ë¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ ²ò·èºö¤Ï¡¢¥ª¥Õ¥£¥¹¤Î SSH ¥µ¡¼¥Ð¤Ø¤Î SSH Àܳ¤ò¹Ô¤¤¡¢ ¥á¡¼¥ë¥µ¡¼¥Ð¤Ø¤Î¥È¥ó¥Í¥ë¤òºîÀ®¤¹¤ë¤³¤È¤Ç¤¹¡£

% ssh -2 -N -f -L 2110:mail.example.com:110 user@ssh-server.example.com
user@ssh-server.example.com's password: ******

¥È¥ó¥Í¥ë¤¬ºîÀ®¤µ¤ì¤ÆÆ°ºî¤·¤¿¤é¡¢ ¥á¡¼¥ë¥¯¥é¥¤¥¢¥ó¥È¤ËÂФ· localhost ¤Î¥Ý¡¼¥È 2110 ¤Ë POP3 ¥ê¥¯¥¨¥¹¥È¤òÁ÷¤ë¤è¤¦¤Ë»Ø¼¨¤Ç¤­¤Þ¤¹¡£ ¤½¤³¤Ø¤ÎÀܳ¤Ï¡¢¥È¥ó¥Í¥ë¤ò·Ðͳ¤·¤Æ°ÂÁ´¤Ë mail.example.com ¤ËžÁ÷¤µ¤ì¤Þ¤¹¡£

15.10.7.1.2. ¸·³Ê¤Ê¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ò¤¹¤êÈ´¤±¤ë

Æâ¸þ¤±¤ÎÀܳ¤ò¥Õ¥£¥ë¥¿¤¹¤ë¤À¤±¤Ç¤Ê¤¯¡¢ ³°¸þ¤±¤ÎÀܳ¤â¥Õ¥£¥ë¥¿¤·¤Æ¡¢ ¶Ëü¤Ë¸·¤·¤¤¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¥ë¡¼¥ë¤ò²Ý¤¹¥Í¥Ã¥È¥ï¡¼¥¯´ÉÍý¼Ô¤â¤¤¤Þ¤¹¡£ ¥ê¥â¡¼¥È¤Î¥Þ¥·¥ó¤Ë¤Ï¡¢SSH Àܳ¤È web ¥µ¡¼¥Õ¥£¥ó¤Î¤¿¤á¤Î 22 ÈÖ¤ª¤è¤Ó 80 È֥ݡ¼¥È¤Ë¤·¤«Àܳ¤µ¤»¤Æ¤â¤é¤¨¤Ê¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¡£

¤¢¤Ê¤¿¤Ï¡¢¤½¤ì°Ê³°¤Î (¤â¤·¤«¤¹¤ë¤È»Å»ö¤Ë´Ø·¸¤Ê¤¤) ¥µ¡¼¥Ó¥¹¤Ë¥¢¥¯¥»¥¹¤·¤¿¤¯¤Ê¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£ Î㤨¤Ð¡¢²»³Ú¥¹¥È¥ê¡¼¥ß¥ó¥°¤ò¹Ô¤¦ Ogg Vorbis ¥µ¡¼¥Ð¤È¤¤¤Ã¤¿¤â¤Î¤Ç¤¹¡£ ¤³¤Î Ogg Vorbis ¥µ¡¼¥Ð¤¬ 22 ÈÖ¤Þ¤¿¤Ï 80 È֥ݡ¼¥È°Ê³°¤Ç¥¹¥È¥ê¡¼¥ß¥ó¥°¤ò¹Ô¤Ã¤Æ¤¤¤¿¤é¡¢ ¤¢¤Ê¤¿¤Ï¤½¤Î¥µ¡¼¥Ð¤ËÀܳ¤Ç¤­¤Ê¤¤¤Ç¤·¤ç¤¦¡£

¤½¤ì¤ËÂФ¹¤ë²ò·èºö¤Ï¡¢ ¤¢¤Ê¤¿¤¬Àܳ¤·¤Æ¤¤¤ë¥Í¥Ã¥È¥ï¡¼¥¯¤Î¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤Î³°Éô¤Ë¤¢¤ë¥Þ¥·¥ó¤ËÂФ·¤Æ SSH Àܳ¤ò¹Ô¤¤¡¢Ogg Vorbis ¥µ¡¼¥Ð¤Ø¤Î¥È¥ó¥Í¥ë¤ËÍøÍѤ¹¤ë¤³¤È¤Ç¤¹¡£

% ssh -2 -N -f -L 8888:music.example.com:8000 user@unfirewalled.myserver.com
user@unfirewalled.myserver.com's password: *******

¥¹¥È¥ê¡¼¥ß¥ó¥°¥¯¥é¥¤¥¢¥ó¥È¤ò localhost ¤Î 8888 È֥ݡ¼¥È¤Ë¸þ¤±¤ë¤È¡¢music.example.com ¤Î 8000 È֥ݡ¼¥È¤ËžÁ÷¤µ¤ì¡¢ ¥Õ¥¡¥¤¥¢¥¦¥©¡¼¥ë¤ò¤¹¤êÈ´¤±¤é¤ì¤Þ¤¹¡£

15.10.8. ¤â¤Ã¤È¾Ü¤·¤¯ÃΤꤿ¤¤¿Í¤Ø

OpenSSH

ssh(1) scp(1) ssh-keygen(1) ssh-agent(1) ssh-add(1)

sshd(8) sftp-server(8)

ËÜʸ½ñ¡¢¤ª¤è¤Ó¾¤Îʸ½ñ¤Ï ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/ ¤«¤é¥À¥¦¥ó¥í¡¼¥É¤Ç¤­¤Þ¤¹¡£

FreeBSD ¤Ë´Ø¤¹¤ë¼ÁÌ䤬¤¢¤ë¾ì¹ç¤Ë¤Ï¡¢¥É¥­¥å¥á¥ó¥È ¤òÆɤó¤À¾å¤Ç <questions@FreeBSD.org> ¤Þ¤Ç (±Ñ¸ì¤Ç) Ï¢Íí¤·¤Æ¤¯¤À¤µ¤¤¡£
ËÜʸ½ñ¤Ë´Ø¤¹¤ë¼ÁÌä¤Ë¤Ä¤¤¤Æ¤Ï¡¢<doc@FreeBSD.org> ¤Þ¤ÇÅŻҥ᡼¥ë¤ò (±Ñ¸ì¤Ç) Á÷¤Ã¤Æ¤¯¤À¤µ¤¤¡£