ÔõÑùʹÓÃÇå¾²µÄÃÜÂëÖÎÀí¹¤¾ß±£»¤CentOSϵͳÖеÄÃÜÂë
ÔõÑùʹÓÃÇå¾²µÄÃÜÂëÖÎÀí¹¤¾ß±£»¤centosϵͳÖеÄÃÜÂë
ÃÜÂëÊDZ£»¤Ð¡ÎÒ˽ÈËÐÅÏ¢ºÍϵͳÇå¾²µÄÖ÷Òª¹¤¾ß¡£ÔÚCentOSϵͳÖУ¬Ê¹ÓÃÇå¾²µÄÃÜÂëÖÎÀí¹¤¾ß¿ÉÒÔÓÐÓõر£»¤ÃÜÂëµÄÇå¾²ÐÔ¡£±¾ÎĽ«ÏÈÈÝÔõÑùʹÓÃÃÜÂëÖÎÀí¹¤¾ßÀ´±£»¤CentOSϵͳÖеÄÃÜÂ룬²¢ÌṩÏà¹ØµÄ´úÂëʾÀý¡£
Ò»¡¢ÃÜÂëÖÎÀí¹¤¾ßµÄÑ¡Ôñ
ÔÚÑ¡ÔñÃÜÂëÖÎÀí¹¤¾ßʱ£¬ÐèҪ˼Á¿ÒÔϼ¸¸ö·½Ã棺
¼ÓÃÜ·½·¨£ºÃÜÂëÖÎÀí¹¤¾ßÓ¦¸ÃʹÓÃÇ¿Ê¢µÄ¼ÓÃÜËã·¨À´±£»¤ÃÜÂë¡£³£ÓõļÓÃÜËã·¨ÓÐAES¡¢RSAµÈ¡£
¶àÒòËØÈÏÖ¤£ºÃÜÂëÖÎÀí¹¤¾ßÓ¦¸ÃÖ§³Ö¶àÒòËØÈÏÖ¤£¬ÈçÖ¸ÎÆʶ±ð¡¢Ó²¼þÁîÅƵȡ£
Çå¾²ÐÔ£ºÃÜÂëÖÎÀí¹¤¾ßÓ¦¸ÃÓÐÓÅÒìµÄÇå¾²ÐÔ²½·¥£¬Èç±ÜÃⱩÁ¦Æƽ⡢±ÜÃâ´¹ÂÚ¹¥»÷µÈ¡£
»ùÓÚÉÏÊö×¼Ôò£¬ÎÒÃÇÑ¡ÔñʹÓÃKeePassÃÜÂëÖÎÀí¹¤¾ßÀ´±£»¤CentOSϵͳÖеÄÃÜÂë¡£
¶þ¡¢×°ÖÃKeePassÃÜÂëÖÎÀí¹¤¾ß
ÔÚCentOSϵͳÖУ¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´×°ÖÃKeePassÃÜÂëÖÎÀí¹¤¾ß£º
sudo yum install keepass
µÇ¼ºó¸´ÖÆ
×°ÖÃÍê³Éºó£¬¿ÉÒÔÔÚÓ¦ÓóÌÐò²Ëµ¥ÖÐÕÒµ½KeePassÃÜÂëÖÎÀí¹¤¾ß¡£
Èý¡¢½¨ÉèºÍÖÎÀíÃÜÂëÊý¾Ý¿â
·¿ªKeePassÃÜÂëÖÎÀí¹¤¾ß£¬µã»÷”File”->”New”£¬½¨ÉèÒ»¸öеÄÃÜÂëÊý¾Ý¿â¡£
ÉèÖÃÒ»¸öÇ¿ÃÜÂëÀ´±£»¤ÃÜÂëÊý¾Ý¿â¡£
ÔÚÃÜÂëÊý¾Ý¿âÖн¨Éè²î±ðµÄ×飬ÒԱ㽫²î±ðÀàÐ͵ÄÃÜÂë¾ÙÐзÖÀàÖÎÀí¡£
¹ØÓÚÿ¸ö×飬¿ÉÒÔ½¨Éè¶à¸öÃÜÂëÏÿ¸öÃÜÂëÏ°üÀ¨ÁËÒ»¸öÏêϸµÄÕ˺źÍÃÜÂë¡£
ÐëҪʱ£¬¿ÉÒÔΪÿ¸öÃÜÂëÏîÌí¼Ó¸½¼ÓÐÅÏ¢£¬ÈçURL¡¢±¸×¢µÈ¡£
ËÄ¡¢Ê¹ÓÃÃÜÂëÊý¾Ý¿â
·¿ªKeePassÃÜÂëÖÎÀí¹¤¾ß£¬Ñ¡ÔñÐèÒªµÄÃÜÂëÊý¾Ý¿â£¬²¢ÊäÈëÃÜÂë¾ÙÐнâËø¡£
´ÓÃÜÂëÊý¾Ý¿âÖÐÑ¡ÔñÐèÒªµÄÕ˺źÍÃÜÂ룬²¢¸´ÖƵ½¼ôÌù°å¡£
ÔÚÐèÒªÊäÈëÃÜÂëµÄµØ·½£¬Õ³ÌùÃÜÂë¼´¿É¡£
Îå¡¢±£»¤ÃÜÂëÊý¾Ý¿âµÄÇå¾²ÐÔ
ΪÁ˱£»¤ÃÜÂëÊý¾Ý¿âµÄÇå¾²ÐÔ£¬ÐèÒª½ÓÄÉһЩ²½·¥£º
ÃÜÂëÊý¾Ý¿âÓ¦¸Ã°´ÆÚ±¸·Ý£¬²¢´æ´¢ÔÚÇå¾²µÄµØ·½¡£
ÃÜÂëÊý¾Ý¿âÓ¦¸Ã¼ÓÃÜ´æ´¢£¬°ü¹Ü×ÝÈ»±»ÇÔÈ¡£¬Ò²ÄÑÒÔ½âÃÜ¡£
ÃÜÂëÊý¾Ý¿âÓ¦¸ÃÉèÖÃÇ¿Ê¢ÇÒÆæÒìµÄÃÜÂ룬×èÖ¹±»²Â½â¡£
ÃÜÂëÊý¾Ý¿âµÄ»á¼ûȨÏÞÓ¦¸ÃÓÐÏÞÖÆ£¬Ö»ÔÊÐíÊÚȨµÄÓû§¾ÙÐлá¼û¡£
ÃÜÂëÊý¾Ý¿â²»Ó¦¸ÃÔÚδ֪»ò²»ÊÜÐÅÍеÄÖÕ¶ËÉÏʹÓá£
Áù¡¢´úÂëʾÀý
ÒÔÏ´úÂëʾÀýÑÝʾÁËÔõÑùʹÓÃPython½ÅÔÀ´´ÓKeePassÃÜÂëÊý¾Ý¿âÖлñÈ¡ÃÜÂ룬²¢ÇÒʹÓþ籾ÖеĹ¦Ð§À´±£»¤ÃÜÂëµÄÇå¾²ÐÔ¡£
import subprocess def get_password(database_path, entry_title): command = "keepassxc-cli show -s "{0}" -a "{1}"".format(database_path, entry_title) output = subprocess.check_output(command, shell=True) password = output.decode().strip() return password password = get_password("/path/to/database.kdbx", "My Account") print("Password: ", password)
µÇ¼ºó¸´ÖÆ
ÒÔÉÏ´úÂëʹÓÃÁËkeepassxc-cliÏÂÁîÐй¤¾ßÀ´»ñÈ¡ÃÜÂë¡£ÔÚʹÓÃ֮ǰ£¬ÐèҪȷ±£ÒѾװÖÃÁËÏà¹ØµÄÈí¼þ°ü¡£
×ܽá
ÒÔÉÏÊǹØÓÚÔõÑùʹÓÃÇå¾²µÄÃÜÂëÖÎÀí¹¤¾ß±£»¤CentOSϵͳÖÐÃÜÂëµÄÏÈÈÝ¡£Í¨¹ýÑ¡ÔñÊʵ±µÄÃÜÂëÖÎÀí¹¤¾ß£¬²¢½ÓÄÉÏìÓ¦µÄÇå¾²²½·¥£¬¿ÉÒÔÈ·±£ÃÜÂëµÄÇå¾²ÐÔ£¬²¢ïÔÌÃÜÂë±»µÁµÄΣº¦¡£Ê¹ÓÃÃÜÂëÖÎÀí¹¤¾ß¿ÉÒÔʹÃÜÂëÖÎÀíÔ½·¢Àû±ãºÍ¸ßЧ¡£Í¬Ê±£¬Í¨¹ýʾÀý´úÂëµÄÑÝʾ£¬¿ÉÒÔ×ÊÖú¶ÁÕ߸üºÃµØÃ÷È·ÔõÑùÏÖʵӦÓÃÃÜÂëÖÎÀí¹¤¾ßÀ´±£»¤ÃÜÂëµÄÇå¾²¡£
ÒÔÉϾÍÊÇÔõÑùʹÓÃÇå¾²µÄÃÜÂëÖÎÀí¹¤¾ß±£»¤CentOSϵͳÖеÄÃÜÂëµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡