( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKBase.class.php on line 114
Call Stack
#TimeMemoryFunctionLocation
10.0014413584{main}( ).../index.php:0
20.08774272176Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.331413057720Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.331613057664Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.331613058040Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.331613058040Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.331713058136Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.332013095768require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.335513386448GKTemplate->__construct( ).../component.php:31
100.347213527968GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.347813572232require_once( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKMenu.php' ).../helper.menu.php:19

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKHandheld.php on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0014413584{main}( ).../index.php:0
20.08774272176Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.331413057720Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.331613057664Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.331613058040Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.331613058040Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.331713058136Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.332013095768require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.335513386448GKTemplate->__construct( ).../component.php:31
100.349413694976GKTemplateMenu->getMenuType( ).../gk.framework.php:85
PuTTYgen
Logo
Print this page

PuTTYgen

PuTTYgen

PuTTYgen 是一套可以產生金鑰的工具,它可生成 RSA 以及 DSA 的金鑰, 做出來的公開以及私有金鑰,可以用於 PuTTY 、 PSCP 、 Plink 以及 Pageant 。

    • 產生一個新的金鑰 :

  1. 直接點選 PuTTYgen 圖示。

  2. 第一步,選擇所要生成之金鑰的演算法 (RSA / DSA) 、 SSH 版阿本以及金鑰的長度,如下圖所示。 

  3. 按下後,在下圖所表示的紅框內任意移動滑鼠, 直到金鑰產生結束,此時,電腦會收集滑鼠任意移動所得到的資訊,最為產生金鑰的亂數依據,如下圖。

  4. 產生完後,可更改金鑰的備註,另外請任意輸入自己不易忘記的句子,做為啟動私鑰的通行碼之用,之後將私鑰儲存在安全的地方,如下圖所示。

  • 以下將講解上述過程中遇到的各個選項及其代表意義:

    • 生成之金鑰的演算法:

  1. SSH 1 協定僅能使用 RSA 做為生成金鑰的演算法,而 SSH 2 協定能夠支援 RSA 以及 DSA 兩種演算法。

  2. PuTTY 的作者強烈建議使用者使用 RSA 來生成金鑰,因為 DSA 有一些設計不良的地方,可能會導致是用者的私鑰被有心人士竊聽,倘若非要使用 DSA 時,也請不要在每台遠端伺服機使用同樣的金鑰。

  • 金鑰的長度:

長度越長,相對而言,也就更為安全,但對於大部分的情況之下, 1024 bit 已經很足夠。

  • 啟動私鑰:

當儲存私鑰至近端電腦時,若沒有輸入通行碼 (passphrase) ,則私鑰不會再被加密,意指任何人若取得此私鑰則對方將聽行無阻。若在儲存之際,有事先輸入自己熟記的一串通行碼,則就算私鑰被拿走,對方也無法取用其中的內容。

請記住你的通行碼,它並無法經由其他方式取得它。

  • 關於相容性的問題:

  • 大部分的 SSH 1 client 使用標準定義的私鑰, PuTTY 也是依照標準來執行,所以不會有與其他的 SSH client 相衝突。

  • 然而 SSH 2 的私鑰並沒有一個標準的格式,所以任一套軟體 (PuTTY 、 OpenSSH 、 ssh.com) 生成的金鑰無法立刻在其他套軟體上執行。

PuTTYgen 能夠將私鑰輸出成 OpenSSH 以及 ssh.com 的格式,請先下載最新測試版的 PuTTYgen ,先將私鑰匯入 PuTTYgen 後,在 Converstions 中選擇所要輸出的格式,在儲存新的私鑰之前,請先移除通行碼。

    • 如何利用金鑰來提供連線認證:

  • 如果你使用 SSH 1 協定,請先至遠端家目錄的 .ssh 目錄,以文字編輯器開啟檔案 authorized_keys ,先暫時回到近端電腦,使用 PuTTYgen 載入所儲存之私鑰,載入後,請將上圖黃色框框內的所有文字複製,再回到 authorized_keys 檔案中,將複製內的東西全部貼上,存檔離開即可。

  • 倘若遠端伺服機提供的是早期版本的 OpenSSH 2 ,先前的檔案要改名為 authorized_keys2 。

  • 如果遠端伺服機為 ssh.com ,你必須先將轉換過公鑰上傳至家目錄的 .ssh2 目錄,並且編輯檔案 authorization ,在檔案中尋找一行開頭為 key ,並且將 key 後面的檔案名稱更改成你剛剛上傳的公鑰檔案名。

  • 請注意位於家目錄的 .ssh 目錄的檔案權限及屬性,它僅可以讓自己寫入。

     


( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0009405280{main}( ).../index.php:0
20.06761323280Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.06761323280Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.22592981600Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.22683005944Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.22753061272Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.22763078328require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.24293222416K2ControllerItem->execute( ).../k2.php:64
90.24293222416K2ControllerItem->display( ).../BaseController.php:710
100.25893491496K2ControllerItem->display( ).../item.php:78
110.25893491496K2ControllerItem->display( ).../controller.php:19
120.26033510016Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.26253530432K2ViewItem->display( ).../ViewController.php:102
140.30704146624K2ViewItem->display( ).../view.html.php:742
150.30704146624K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.30954321024include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0009405280{main}( ).../index.php:0
20.06761323280Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.06761323280Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.22592981600Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.22683005944Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.22753061272Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.22763078328require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.24293222416K2ControllerItem->execute( ).../k2.php:64
90.24293222416K2ControllerItem->display( ).../BaseController.php:710
100.25893491496K2ControllerItem->display( ).../item.php:78
110.25893491496K2ControllerItem->display( ).../controller.php:19
120.26033510016Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.26253530432K2ViewItem->display( ).../ViewController.php:102
140.30704146624K2ViewItem->display( ).../view.html.php:742
150.30704146624K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.30954321024include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
Template Design © Joomla Templates | GavickPro. All rights reserved.