ºìÁªLinuxÃÅ»§
Linux°ïÖú

ÔÚUnixÏÂÓÃÃüÁîÐÐÖÐÍê³ÉËùÓеŤ×÷

·¢²¼Ê±¼ä:2006-10-30 10:15:12À´Ô´:ºìÁª×÷Õß:ĪÞÈ
¡¡¡¡UNIX® ÃüÁîÐÐÊÇÒ»ÖÖWYTIWYG£¨¼´ËùÊä¼´ËùµÃ£©µÄ½Ó¿Ú¡£UNIX ÌṩÁË´óÁ¿µÄÃüÁʹÓÃÕâЩÃüÁÄú¿ÉÒÔ¶ÔÄں˺ÍÓû§¿Õ¼äÖи÷ÖÖ¿ÉÓõÄ×ÊÔ´½øÐвÙ×÷¡£ÄúÐèÒª¶Ô CPU µÄʹÓÃÇé¿ö½øÐмàÊÓÂ𣿿ÉÒÔ³¢ÊÔʹÓà top »ò ps¡£ÄúÐèҪɾ³ýËùÓÐÒÔ .bak ½áβµÄÎļþÂ𣿿ÉÒÔ³¢ÊÔʹÓà rm *.bak¡£ÄúÐèÒª»ñµÃ¹ØÓÚÒ»¸öеÄÃüÁîµÄ°ïÖúÂ𣿿ÉÒÔÔËÐÐ man¡£
¡¡¡¡µ«ÊÇ£¬µ±ÄúËùÐèÒªµÄ×ÊԴλÓÚ¹ãÓòÍø (WAN) ºÍÈ«Çò Internet ÖеÄÔ¶³Ìϵͳʱ£¬ÄÇÓÖÓ¦¸ÃÈçºÎ´¦ÀíÄØ£¿ÕâÀïÒýÓà The Hitchhiker's Guide to the Galaxy ÖеÄÒ»¾ä»°£¬¡°Äú²»±Ø¾ª»Åʧ´ë¡±¡£Í¨¹ý UNIX ÃüÁîÐпÉÒÔºÜÈÝÒ×µØÏÂÔغÍÉÏ´«Îļþ¡¢Á¬½Óµ½Ô¶³Ì¼ÆËã»ú²¢Ñ¯ÎÊÒ£Ô¶µÄ·þÎñÆ÷ºÍÍøÂçµÄ״̬¡£Çë×öºÃ×¼±¸£ºÈÃÎÒÃÇ¿ªÊ¼Ò»´Î¡°Ì«ÑôϵÍ⡱µÄÆæÃîÂÃÐС£
¡¡¡¡ÔÚ±¾µØ½øÐй¤×÷£¬½«ÐÅÏ¢´«Ê䵽ȫÇò
ÔÚ±¾ÏµÁÐµÄµÚ 1 ²¿·ÖºÍµÚ 2 ²¿·ÖÖУ¬ÄúÁ˽âÁËʹÓà UNIX ÃüÁîÐпÉÒÔÍê³É¸÷ÖÖ¸÷ÑùµÄ¹¤×÷¡£Ö»ÐèÒªÊäÈëÏàÓ¦µÄÄÚÈÝ£¬°üÀ¨¹ÜµÀ (|) »òÖض¨Ïò£¬Äú¾Í¿ÉÒÔ´´½¨¼´Ð˵ÄÊý¾Ý´¦ÀíÆ÷£¬´Ó¶øʵÏֱȽ«ÆäÖеÄÕâЩ²¿·Ö¼òµ¥µØ¼ÓÔÚÒ»Æð¸üÇ¿´óµÄ¹¦ÄÜ¡£
¾¡¹ÜÈÕ³£Ê¹ÓõÄijЩ×ÊÔ´ºÜ¿ÉÄÜλÓÚ±¾µØ£¬¼´Î»ÓÚÄúµÄ¹¤×÷Õ¾ÖУ¬µ«ÊÇÏ൱ÊýÁ¿µÄ¡¢²¢ÇÒÔ½À´Ô½¶àµÄ×ʲú£¨ÈçÎļþ¡¢µç×ÓÓʼþÏûÏ¢ºÍ¹¤¾ß£©¿ÉÄÜ´æ´¢ÔÚÔ¶³ÌϵͳÖУ¬¼´Î»ÓÚÁ¬½Óµ½ÄúµÄ WAN »òÕß Internet µÄ¼ÆËã»úÖС£Web ä¯ÀÀÆ÷ÌṩÁ˶ÔÕâЩ×ÊÔ´µÄͨÓ÷ÃÎÊ·½Ê½£¬µ«ÊÇÓÐÒ»µãÐèҪעÒ⣺ָÏò-µã»÷ºÜ¿ì»á±äµÃÁîÈËÑá¾ë£¬ÉõÖÁºÜÂé·³£¬ÌرðÊǵ±Äú±ØÐë¶Ô´óÁ¿µÄÌõÄ¿½øÐмìË÷ʱ¡£¶øÇÒ£¬Èç¹ûÄúÏ£ÍûʹÓýű¾ À´Íê³ÉÖظ´ÐԵĻòÈÝÒ׳ö´íµÄÈÎÎñʱ£¨´Ó±¾ÖÊÉÏ˵£¬ÊǽøÐⶻñºÍÖØ·Å£©£¬´°¿Úä¯ÀÀÆ÷²¢²»ÊÇÒ»ÖֺõŤ¾ß¡£
¡¡¡¡Telnet£¨ºÍÆäËû¹¤¾ß£©´æÔÚµÄÎÊÌâ
Èç¹ûÄúµÄϵͳÖÐÔËÐÐÁË rsh£¨»òÕßÆä±äÖÖ----rcp¡¢rexec¡¢rlogin »ò Irdist£©»ò telnet£¬ÄÇôÇëÁ¢¼´½ûÓò¢É¾³ýÕâЩÃüÁîÒÔ¼°Ïà¹ØµÄÊØ»¤½ø³Ì¡£ÁíÍ⣬Èç¹ûÄú²»ÔÊÐíʹÓÃÄäÃûÎļþ´«ÊäЭÒé (FTP)£¬Çëͬʱ½ûÓà FTP Èí¼þ¡£
¾¡¹Ü rsh ºÍ telnet ÔÚ UNIX ÖÐʹÓÃÁ˺ܳ¤µÄʱ¼ä£¬µ«Êǹ¥»÷Õß¿ÉÒÔÇáËɵØÀûÓÃÕâÁ½ÖÖʵÓù¤¾ßµÄÆäÖÐÖ®Ò»À´Î£º¦ÄúµÄϵͳ¡£µ±·¢ÏÖ¸ÃÈí¼þÕýÔÚÔËÐÐʱ£¬Äú»òÄúµÄϵͳ¹ÜÀíÔ±Ó¦¸ÃÍ£Ö¹²¢É¾³ýËü£¬²¢Ê¹Óà ssh À´´úÌæÕâЩ°ü¡£
¶ÔÓÚÌØȨ FTP ·ÃÎÊ£¬¿ÉÒÔʹÓà sftp¡£½« rdist Ì滻Ϊ¸ü¸ß¼¶µÄ rsync¡£»òÕߣ¬Èç¹ûÄú±ØÐëÌṩÄäÃû FTP£¨»òͨ¹ý HTTP ½øÐÐÏÂÔØ£©£¬ÇëÈ·±£Ê¹Ó÷À»ðǽӲ¼þºÍÈí¼þ½«ËùÓпÉÒÔ¹«¿ª·ÃÎʵļÆËã»úÓëÃô¸ÐµÄÄÚ²¿·þÎñÆ÷¸ôÀë¡£
µ«ÊÇÊ×ÏÈ£¬ÈÃÎÒÃÇÀ´ÌÖÂÛÒ»ÏÂÃÜÂëËù´øÀ´µÄÌÖÑáµÄÎÊÌâ¡£
¡¡¡¡¡°Äú²»ÐèÒªÌÖÑáµÄÃÜÂ룡¡±
ͨ³££¬¶Ô´ó¶àÊý¼ÆËã»úºÍ·þÎñµÄ·ÃÎʶ¼Êܵ½±£»¤¡£ÔÚÓÐЩÇé¿öÏ£¬½øÐÐÉí·ÝÑéÖ¤£¨´Ó¶ø»ñµÃ·ÃÎʸÃϵͳµÄȨÏÞ£©¿ÉÄÜÐèÒª¸´ÔÓµÄÖÊѯ-ÏìÓ¦½»»»¡¢°²È«Ì×½Ó×Ö²ã (SSL) Ö¤Êé¡¢ÉõÖÁÉúÎï²â¶¨É¨Ã衣Ȼ¶øÔÚÒ»°ãÇé¿öÏ£¬Í¨¹ýÃÜÂë¾Í¿ÉÒÔ»ñµÃ·ÃÎÊȨÏÞ¡£ÓëÄúµÄ¸öÈËʶ±ðºÅÂë (PIN) Ïàͬ£¬ÄúµÄÃÜÂëÒ²ÊDZ£Ãܵģ¬Èç¹ûÄúÑ¡ÔñÁ˺ÏÊʵÄÃÜÂ룬ÄÇôÆäËûµÄÈ˽«ºÜÄѲµ½Ëü¡£½«ÄúµÄÓû§ÃûºÍÇ¿ÃÜÂë×éºÏÔÚÒ»Æð£¬ÕâÑù¿ÉÒÔÌṩ×ã¹»µÄ°²È«ÐÔ¼ÓÇ¿¡£
µ±È»£¬Ç¿ÃÜÂë¿ÉÄÜÄÑÒÔ¼Çס£¬²¢ÇÒµ±ÄúÐèÒªÊÕ¼¯ºÍ¼ÇסÁíÒ»¸ö 8 ×Ö·ûµÄÃÜÔ¿£¨Êý×Ö¡¢±êµã·ûºÅ¼°Æä×éºÏ£©Ê±£¬Çé¿ö±äµÃ¸ü¸´ÔÓ¡£·´¸´µØÊäÈëͬһ¸öÃÜÂë»áÈÃÈ˸е½ÌÖÑᣬ¸üÔã¸âµÄÊÇ£¬Ëü¼«´óµØ×è°­ÁË×Ô¶¯»¯µÄʵÏÖ¡£

È»¶ø£¬Ê¹ÓÃÕâÖÖ·½·¨¿ÉÄܻὫÄúµÄƾ¾Ýй©¸ø¹²Ïí¸Ã¼ÆËã»úµÄÆäËûÓû§¡££¨¿ÉÒÔ³¢ÊÔʹÓà ps -Aeww£¬ÀýÈ磬²é¿´ÍêÕûµÄÃüÁîÐкÍϵͳÖÐÿ¸ö½ø³ÌµÄ»·¾³¡££©
ÏÔÈ»£¬Èç¹ûÎļþÖаüº¬ÈκαêʶÊý¾Ý£¬ÄÇôÇëÈ·±£Ëü½ö¾ßÓÐÓû§¶Áдģʽ£¨Ä£Ê½ 600£©»òÓû§Ö»¶Áģʽ£¨Ä£Ê½ 400£©£¬ÒÔ·ÀÖ¹ÒâÍâµØ¸²¸Ç»òɾ³ý¸ÃÎļþ¡£Äú¿ÉÄÜ»¹Ï£ÍûʹÓÃģʽ 700 À´±£»¤ÄúµÄ home Ŀ¼¡£
¡¡¡¡´«µÝµÄ¹ý³Ì
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 3 ÌõÆÀÂÛ

  1. ĪÞÈ ÓÚ 2006-10-30 10:18:18·¢±í:

    ÃüÁî 1 µ½ 3 ÔÚÄúµÄ home Ŀ¼Öд´½¨ÁËÒ»¸öÃûΪ .ssh µÄ˽Óб¾µØĿ¼¡£Õâ¸öĿ¼µÄģʽ±ØÐëΪ 700£¬·ñÔò ssh ÎÞ·¨Ê¹Óù«Ô¿»ò˽ԿÉí·ÝÑéÖ¤¡££¨Äú¿ÉÒÔ¿´µ½£¬²½Öè A µ½ C ¶ÔÔ¶³Ì¼ÆËã»úÔËÐÐÁËÏàͬµÄÃüÁîÐòÁС££©ÃüÁî 5 ʹÓà DSA ´´½¨ÁËÃÜÔ¿¶Ô¡£½ÓÏÂÀ´£¬±£³ÖÆäÖеÄÁ½¸ö Passphrase Ϊ¿Õ¡££¨ËüÃÇÌṩÁ˶îÍâµÄ°²È«¼¶±ð£¬µ«È´Ìí¼ÓÁËÒ»ÏîÉí·ÝÑéÖ¤²½Öè¡££©ssh-keygen Éú³ÉÁ½¸öÎļþ£ºid_dsa£¨Ë½Ô¿£©ºÍ id_dsa.pub£¨¹«Ô¿£©¡£²½Öè 6 ÏÔʾÁËÕâЩÎļþ£¬¶ø²½Öè 7 Ôò¶ÔÕâÁ½¸öÃÜÔ¿½øÐб£»¤¡£ÄúµÄÃÜÔ¿µÄģʽ±ØÐëΪ 0600 »ò 0400¡£
    ²½Öè 8 ½«¹«Ô¿¸´ÖƵ½Ô¶³Ì¼ÆËã»ú¡£½ÓÏÂÀ´£¬Äú±ØÐëÊäÈëÄúµÄÃÜÂ룬µ«ÕâÊÇ×îºóÒ»´ÎÊäÈëÁË¡£ÃüÁî A µ½ C ´´½¨ÁË˽ÓÐµÄ .ssh Ŀ¼£¬¶ø²½Öè D Ôò½«¹«Ô¿Ìí¼Óµ½ÊÚȨÃÜÔ¿ÁбíÖС£¸ÃÎļþµÄÃû³ÆΪ authorized_keys£¬ÕâÊÇÓÐÒâÕâÑù×öµÄ¡£²»Òª½«¸ÃÎļþÃüÃûΪÆäËûµÄÃû³Æ¡£²½Öè E ɾ³ýÁËÃÜÔ¿µÄ¸±±¾£¬²½Öè F ºÍ²½Öè 7 Ò»Ñù£¬¶ÔÎļþ½øÐб£»¤¡£
    µ±Äú×¢Ïú£¬È»ºóÖØеǼʱ£¬²»ÔÙÐèҪʹÓÃÃÜÂë¡£ssh£¨ÒÔ¼° scp ºÍ sftp£©¿ÉÒÔʹÓÃÄúµÄ˽Կ¶ÔÔ¶³Ì¹«Ô¿½øÐвâÊÔ¡£Èç¹ûÆ¥Å䣬Ôò±íʾÄúµÄƾ¾ÝÊÇÓÐЧµÄ£¬Äú¿ÉÒԳɹ¦µÇ¼¶øÎÞÐè½øÒ»²½µÄʶ±ð¡£
    ÓÐЩϵͳʼÖÕÐèҪʹÓÃÃÜÂ룬¶øÆäËûµÄϵͳ¿ÉÄÜʹÓà RSA ¶ø²»ÊÇ DSA¡£Óëϵͳ¹ÜÀíÔ±ÁªÏµ£¬ÒÔ±ãŪÇå³þÈçºÎµÇ¼µ½Ìض¨µÄ¼ÆËã»ú¡£ÏµÍ³¹ÜÀíÔ±¿ÉÒÔ½øÐÐһЩȫ¾ÖÉèÖã¬ÕâÑù¿ÉÒÔʹµÃϵͳ¸üÈÝÒ×·ÃÎÊ¡£
    ¡¡¡¡ÈκÎʱ¼ä¡¢Èκεص㶼´¦ÓÚÁª»ú״̬
    Èç½ñ£¬Internet ÒÔÒ»ÖÖÈËÀàÀúÊ·ÉÏÇ°ËùδÓеķ½Ê½½«ÉíÔÚ¸÷´¦µÄÈËÃÇÁªÏµµ½Ò»Æð¡£ÎÞÂÛÊÇÔÚ²©¿ÍÖзÖÏíÉú»îµÄϸ½ÚÐÅÏ¢£¬»¹ÊÇΪÄúµÄÏÂÒ»¸öÏîÄ¿ÏÂÔØÏà¹ØµÄÔ´´úÂ룬¶¼¿ÉÒÔͨ¹ýÍøÂçÀ´Íê³É£¬¶ø²»ÔÙÐèÒªÇý³µ±¼×ß¡£
    ¼ÈÈ»ÒѾ­Çå³þÁËÕâÒ»µã£¬ÄÇôÄú¾Í¿ÉÒÔ·ÅÏÂÆû³µ¶¥Å¼Ý³µÊ»ÈëÐÅÏ¢³¬¸ßËÙ¹«Â·ÁË¡£ÈÃÎÒÃÇÔÚÍøÂ羡ͷµÄ²Í¹Ý¼û¡£ºóµ½µÄÈ˸¶ÕÊÓ´£¡

  2. ĪÞÈ ÓÚ 2006-10-30 10:17:28·¢±í:

    ¡¡¡¡Áù´¦ÐèҪ˵Ã÷µÄµØ·½
    ÏÖ´ú¼ÆËãÈÎÎñµÄÍê³ÉÔںܴó³Ì¶ÈÉÏÒÀÀµÓÚ¸÷ÖÖÐͺš¢¹æÄ£ºÍ·þÎñµÄ¼ÆËã»úÖ®¼äÎÞÊýµÄ»¥Á¬¡£Êµ¼ÊÉÏ£¬¼´Ê¹ÔÚÒ»¸öСÐ͵ļÆËã»·¾³ÖУ¬Ò²¿ÉÄÜÓÐһ̨¼ÆËã»úרߺÔðµç×ÓÓʼþ£¬Áíһ̨¼ÆËã»ú¸ºÔðÌṩ Web Ò³Ã棬¶øÆäËûµÄ¼ÆËã»úÔòÓÃÀ´Ö´ÐиüרÃŵÄÈÎÎñ¡£ÔÚÕâÖÖ»·¾³ÖУ¨Í¨³£Ê¹ÓþÖÓòÍø (LAN)¡¢WAN »òÐéÄâרÓÃÍø (VPN) ½øÐÐÁ¬½Ó£©£¬Ã¿Ì춼ÐèÒªµÇ¼µ½²»Í¬µÄ¼ÆËã»ú¡£ÏµÍ³¹ÜÀíÔ±ÐèÒª²»Í£µØ´Óһ̨¼ÆËã»úתµ½Áíһ̨¼ÆËã»ú£¬µ«ÊǶÔÓÚ¿ª·¢ÈËÔ±ºÍÆäËûµÄÓû§À´Ëµ£¬Í¨³£ÔòÐèÒªµÇ¼µ½²»Í¬µÄ¼ÆËã»úÒÔʵÏֶԹؼüµÄÓ¦ÓóÌÐòµÄÔ¶³Ì·ÃÎÊ¡£
    X Window System ºÍÏÖÓеÄ×ÀÃæÈí¼þʹµÃÔ¶³Ì·ÃÎʱäµÃÏ൱͸Ã÷£º´°¿Ú½ö½öÖ»ÊÇ´°¿Ú£¬¶ø»ù´¡Ó¦ÓóÌÐò¿ÉÒÔÔËÐÐÓÚÈκμÆËã»ú¡£ÕâÀïÔÙ´Î˵Ã÷£¬¼´Ê¹ÔÚÕâ¸öÒÔÊó±êΪÖÐÐĵĻ·¾³ÖУ¬ÃüÁîÐÐÒ²»¹ÊÇÓÐÆäһϯ֮µØµÄ¡£ÀýÈ磬ÈçºÎÇáËɵØÔÚ¶ą̀¼ÆËã»úÉÏÔËÐÐÏàͬµÄÃüÁîÄØ£¿»òÕߣ¬¸ü¼òµ¥µØ˵£¬ÈçºÎÔÚÔ¶³ÌϵͳÖÐÆô¶¯Ò»¸ö xterm ´°¿ÚÄØ£¿
    ÌṩԶ³Ìϵͳ·ÃÎÊÕýÊÇ ssh ¼°ÆäÅÉÉú¹¤¾ß£¨scp ºÍ sftp£©µÄÈÎÎñ¡£ssh ÊÇ rsh µÄ°²È«°æ±¾£¬¶ø scp ºÍ sftp Ôò·Ö±ðÊÇ rcp ºÍ FTP µÄ°²È«Ìæ´ú¡£ËüΪʲôÊÇ°²È«µÄÄØ£¿ssh ¼°Æä±äÖÖÌṩÁ˸üÇ¿µÄÉí·ÝÑéÖ¤»úÖÆ£¬²¢Ê¹ÓÃÄúËùÑ¡ÔñµÄ¼¸¸öÃÜÂë¶ÔËùÓеÄͨÐÅÄÚÈݽøÐмÓÃÜ¡£¼´Ê¹ÓÐÈË̽²é ÄúµÄÍøÂ磬ssh ͨÐÅÊý¾Ý¶ÔËûÃÇÀ´ËµÒ²ºÁÎÞÒâÒå¡£
    ssh ×î¼òµ¥µÄÓ÷¨ÊÇ ssh hostname¡£¸ÃÃüÁÁ¬½Óµ½ hostname£¬²¢ÌáʾÄúÊäÈëµÇ¼ÃûºÍÃÜÂë¡£ÔÚÌṩÁËÕýÈ·µÄƾ¾ÝÖ®ºó£¬Äú¾Í¿ÉÒԵǼµ½ÏµÍ³ÖУº
    Login: arthur
    Password: ******

    Èç¹ûÄúÖ»ÐèÒªÔÚÔ¶³ÌϵͳÖÐÔËÐÐÒ»¸öÃüÁÄÇô¾Í²»ÐèÒª½øÐеǼ¡£Ö»Ð轫¸ÃÃüÁî×÷Ϊ ssh µÄ²ÎÊý¼´¿É¡£ÀýÈ磬Çåµ¥ 3 ÖÐËùʾµÄÃüÁîÓÃÓÚÔÚÔ¶³Ì¼ÆËã»úÉÏÔËÐÐ hostname -a -v¡£
    ¡¡¡¡Çåµ¥ 3. ʹÓà ssh ÔÚÔ¶³ÌϵͳÖÐÔËÐÐÃüÁî

    Login: vogon
    Password: ******
    db
    Result: h_aliases=`db'
    Result: h_addr_list=`64.34.170.230'
    ssh »¹Îª½«ÎļþºÍÕû¸öĿ¼´Óһ̨¼ÆËã»ú¸´ÖƵ½Áíһ̨¼ÆËã»úÌṩÁËÒ»ÖÖ±ã½ÝµÄ·½·¨¡£scp Óë cp Ò»ÑùºÜÈÝÒ×ʹÓá£ÕâÀïÓÐÒ»¸öʾÀý£º
    ˳±ãÌáһϣ¬Ç°ÃæµÄ scp ÃüÁîµÈ¼ÛÓÚ£º
    Login: deepthought
    Password: ******
    Êǵģ¬Äú¿ÉÒÔͨ¹ý¹ÜµÀ½«±¾µØÃüÁîµÄÊä³ö´«µÝ¸øÔ¶³ÌÃüÁ·´Ö®ÒàÈ»£©¡£
    Äú¿ÉÄÜÒѾ­Ñá¾ëÁËÕâЩÃÜÂëÊäÈëÌáʾ¡£Í¬Ñù£¬ÕâЩ·´¸´³öÏÖµÄÌáʾ½«½µµÍ¹¤×÷ЧÂʲ¢Ó°Ïì×Ô¶¯»¯µÄʵÏÖ¡£ÄúÒ²¿ÉÄÜÑá¾ëÁËÒ»´ÎÓÖÒ»´ÎµØÊäÈëÈß³¤µÄÓû§Ãû¡£ÐÒÔ˵ÄÊÇ£¬ssh Ö§³Ö¹«Ô¿»ò˽ԿÉí·ÝÑéÖ¤ºÍϵͳ±ðÃû¡£
    ÏÂÃ棬ÈÃÎÒÃÇʹÓà DSA ¼ÓÃÜ·½°¸À´ÉèÖù«Ô¿»ò˽Կ¶Ô¡£ÒªÍê³ÉÕâÏ×÷£¬Äú±ØÐëÉú³ÉÃÜÔ¿¶Ô£¬½«¹«Ô¿¸´ÖƵ½Ô¶³Ìϵͳ£¬²¢½«ËüÌí¼Óµ½ÒÑÖªÃÜÔ¿ÁбíÖУ¬È»ºó¶ÔÆä½øÐÐÑéÖ¤£¬ÈçÇåµ¥ 4 Ëùʾ¡£
    ¡¡¡¡Çåµ¥ 4. ´´½¨²¢°²×°¹«Ô¿»ò˽Կ

    1 $ cd ~
    2 $ mkdir .ssh
    3 $ chmod 700 .ssh
    4 $ cd .ssh
    5 $ ssh-keygen -t dsa
    Generating public/private dsa key pair.
    Enter file in which to save the key (/home/mstreicher/.ssh/id_dsa): ./id_dsa
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in ./id_dsa.
    Your public key has been saved in ./id_dsa.pub.
    The key fingerprint is:
    6 $ ls
    id_dsa id_dsa.pub
    7 $ chmod 600 *
    Login: marvin
    Password: ******
    id_dsa 100% 668 0.7KB/s 00:00
    Login: marvin
    Password: ******
    A $ mkdir .ssh
    B $ chmod 700 .ssh
    C $ cd .ssh
    D $ cat ../id_dsa.pub >> authorized_keys
    E $ rm ../id_dsa.pub
    F $ chmod 600 *
    G $ logout
    a $ hostname
    b $ logout

  3. ĪÞÈ ÓÚ 2006-10-30 10:16:31·¢±í:

    ¡¡¡¡Çåµ¥ 1. ÔÚÃüÁîÐÐÖÐʹÓà wget ÏÂÔØÎļþ

    => `wget-1.10.2.tar.gz'
    HTTP request sent, awaiting response... 200 OK
    Length: 1,213,056 [application/x-tar]
    100%[=====================>] 1,213,056 531.22K/s
    16:02:37 (529.57 KB/s) - `wget-1.10.2.tar.gz' saved [1213056/1213056]
    /i386/RELEASE-NOTES-en.html
    TextWrangler_2.1.3.dmg [9488296/9488296] ->
    "TextWrangler_2.1.3.dmg" [1]
    FINISHED --16:06:41--
    Downloaded: 9,521,902 bytes in 2 files
    5 $ ls
    RELEASE-NOTES-en.html index.html wget-1.10.2.tar.gz
    ÃüÁî 1 ͨ¹ý HTTP ´Ó¸ÃÏîÄ¿µÄÖ÷Ò³ÏÂÔØ×îÐ嵀 wget Ô´´úÂë¡£ÔÚȱʡÇé¿öÏ£¬wget ½«ÏòÄú±¨¸æÏÂÔصĹý³Ì¡£Äú¿ÉÒÔʹÓà -q£¨±íʾ quiet ģʽ£©Ñ¡ÏîÀ´½ûÖ¹ËùÓеÄÏûÏ¢¡£ÃüÁî 2 ͨ¹ý FTP »ñÈ¡ CentOS µÄ·¢²¼ËµÃ÷£¬Í¬ÑùҲʹÓÃÁË quiet ģʽ¡£
    ³ý·ÇÄúΪÏÂÔصÄÎļþÌṩÁËÏàÓ¦µÄÎļþÃû£¨Ê¹Óà -o Ñ¡Ï£¬·ñÔò wget ½«´´½¨Ò»¸öÓëÔ¶³ÌÎļþÃû³ÆÏàͬµÄеı¾µØÎļþ£¬¶øÊ¡ÂÔÇ°ÃæµÄ URL ²¿·Ö¡£ÃüÁî 5 ÏÔʾÁËÔÚÃüÁî 1 µ½ 3 ÖÐÏÂÔØµÄ 4 ¸öÎļþ¡£
    wget ʵÓù¤¾ßÓÐÐí¶àÑ¡ÏîºÍÌØÐÔ¡£Ëü¿ÉÒÔ·ÃÎÊ FTP »ò Web Õ¾µã£¬²¢ÏÂÔؾßÓвã´Î½á¹¹µÄËùÓÐÎļþ¡£Äú»¹¿ÉÒÔΪ×Ô¶¯ÏÂÔØÉèÖÃÏàÓ¦µÄÅä¶î¡¢Ìṩ cookies¡¢²¢¼ÌÐø½øÐÐÒÔÇ°±»ÖжϵÄÏÂÔØÈÎÎñ¡£ÒªÁ˽â¹ØÓÚʹÓøù¤¾ßµÄ¼¼ÇÉ£¬ÇëÔĶÁ wget µÄ man Ò³Ãæ¡£
    ¡¡¡¡½øÐÐÉÏ´«

    foreach db (mydns mysql cms tv radio)
    /usr/bin/mysqldump --ppassword --add-drop-table -Q --complete-insert $db > $db.sql
    end
    find dbs -mtime -1 -type f -name '*.sql' -print | foreach file (`xargs`)
    end