乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      ssh, scp 免輸入密碼訪問

       憂郁_小剛 2012-10-28



      經(jīng)常在不同linux機(jī)器之間互相scp拷文件,每次總是要輸入密碼才可行。

      通過ssh-keygen生成公鑰,在兩臺(tái)機(jī)器之間互相建立信任通道即可。

      假設(shè)本地機(jī)器client,遠(yuǎn)程機(jī)器為server。

      1. 生成rsa keygen

      [winter@client winter] $ ssh-keygen -b 1024 -t rsa
      Generating public/private rsa key pair.
      Enter file in which to save the key (/home/winter/.ssh/id_rsa): <Enter>
      Enter passphrase (empty for no passphrase): <Enter>
      Enter same passphrase again: <Enter>
      Your identification has been saved in /home/winter/.ssh/id_rsa.
      Your public key has been saved in /home/winter/.ssh/id_rsa.pub.
      The key fingerprint is:
      33:d4:7b:9c:87:04:cf:14:40:22:6d:c7:15:78:97:6a winter@client

      直接上面公鑰和私鑰存放地址可以直接回車,私鑰密碼可以直接回車,也可以輸入。

      2. 查看.ssh目錄下了多私鑰和公鑰文件

      [winter@client winter] $ ls .ssh/
      id_rsa  id_rsa.pub  known_hosts

      3. 拷貝公鑰到目標(biāo)機(jī)器上,并改名成authorized_keys

      [winter@client winter] $ scp .ssh/id_rsa.pub winter@192.168.0.110:/home/winter/.ssh/authorized_keys
      The authenticity of host '192.168.0.110(192.168.0.110)' can't be established.
      RSA key fingerprint is 5b:78:e8:e9:dc:d8:db:bd:f7:66:44:e6:3b:ce:f2:79.
      Are you sure you want to continue connecting (yes/no)? yes
      Warning: Permanently added '192.168.0.110' (RSA) to the list of known hosts.
      winter@192.168.0.110's password: <Enter>
      id_rsa.pub                                                                     100%  221     1.2MB/s   00:00

      首次scp命令時(shí)候還是會(huì)提示輸入密碼,還有是否繼續(xù)鏈接的提示,以后

      4. 測(cè)試ssh進(jìn)入

      [winter@client winter] $ ssh 192.168.0.110

      5. ok,搞定!

      [winter@server winter] # it's ok!




      [winter@client winter] $ ssh 192.168.0.110

      5. ok,搞定!

      [winter@server winter] # it's ok!

        本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評(píng)論

        發(fā)表

        請(qǐng)遵守用戶 評(píng)論公約

        類似文章 更多