Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:network:sshkey [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:network:sshkey

以前のリビジョンの文書です



Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/handler.php on line 1458

Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line 79

Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line 101

Warning: preg_match(): Compilation failed: invalid range in character class at offset 3120 in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/lexer.php on line 118
A PCRE internal error occured. This might be caused by a faulty plugin

====== sshの鍵認証設定 ====== ---- 自分のPC(クライアント)から他のPC(サーバー,namae@hostname)に対して * パスワード入力無しでssh login * パスワード入力無しでscpでファイル転送 * パスワード入力無しでsshでcommand送信 などしたいとする。 ==== 手順0 ==== はじめに、双方で~/.ssh/ を作成、permissionを700にしておく。\\ ---- ==== 手順1 ==== クライアント側で鍵を作る。 クライアント側のPCで''ssh-keygen''を実行 <code> $ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/hoge/.ssh/id_rsa): <-鍵のファイルの名前を聞かれるので入力 Enter passphrase (empty for no passphrase):           <-パスフレーズを聞かれるので入力(空のままEnterでも良い) Enter same passphrase again:                   <-パスフレーズ再入力 Your identification has been saved in /home/hoge/.ssh/id_rsa. <- 秘密鍵を作成 Your public key has been saved in /home/hoge/.ssh/id_rsa.pub. <-公開鍵を作成 The key fingerprint is: ..... </code> これで、秘密鍵/home/hoge/.ssh/id_rsa と公開鍵/home/hoge/.ssh/id_rsa.pub が作成される。\\ 公開鍵の方をサーバーに渡す。 <code> $ scp /home/hoge/.ssh/id_rsa.pub namae@hostname:~/.ssh/ </code> ---- ==== 手順2 ==== サーバー側で設定を行う。\\ <code> $ ssh namae@hostname # login ### 以下サーバー側 $ cd ~/.ssh/ $ cat id_rsa.pub >> authorized_keys # 公開鍵情報をauthorized_keysにmerge $ rm id_rsa.pub            # もういらないので削除 </code> ✳︎ authorized_keysのpermissionは600にしておく '' chmod 600 ~/.ssh/authorized_keys '' ---- ==== 手順3 ==== クライアント側に戻って設定。\\ クライアント側の~/.ssh/config に以下のように記述 <code> </code>

ja/network/sshkey.1433969895.txt.gz · 最終更新: 2015/06/10 20:58 by kota