「マイクロソフト系技術情報 Wiki」は、「Open棟梁Project」,「OSSコンソーシアム .NET開発基盤部会」によって運営されています。 目次 †概要 †
ダウンロード †
インストール †デフォルト設定でインストール 公開鍵 †キー生成 †puttygen.exeを起動 †Generateボタンを押下 †(Please generate some randomness by moving the mouse over the blank area.) → 押下後、マウスカーソルを動かしてキー生成。 生成されたキーを保存 †
キー配置 †公開鍵をサーバの「~/.ssh/authorized_keys」ファイルに追加する。 .sshディレクトリの作成 †mkdir ~/.ssh authorized_keysファイルの作成 †vi ~/.ssh/authorized_keys authorized_keysファイルに公開鍵をペースト †接続テスト †SSHサーバと接続をテスト †plink.exeを使用して接続テストする。 c:\...\plink.exe -i c:\...\ssh-key.ppk xxxx@yyyy -batch -T echo "hello world" REM 'hello world' should print 初回は以下の表示がある。 †The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is. The server's ssh-ed25519 key fingerprint is: ssh-ed25519 255 ae:c6:f5:99:ab:41:39:ad:7d:fa:8b:9a:8d:bd:c0:24 If you trust this host, enter "y" to add the key to PuTTY's cache and carry on connecting. If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n) y ハマり所 †ハマり所のメモ。 Terminal+viにコピペ †公開鍵を、
パーミッション †ファイル属性のパーミッションについては、コチラ。 .sshディレクトリ †755でないと正しく動作しない。 $ cd ~/ $ ls -al total xx ... drwxrwxrwx 1 seigi seigi 512 Aug 20 13:29 .ssh $ chmod 755 .ssh $ ls -al total xx ... drwxr-xr-x 1 seigi seigi 512 Aug 20 13:29 .ssh authorized_keysファイル †644または600でないと正しく動作しない。 $ cd ~/.ssh $ ls -l total 0 -rw-rw-rw- 1 seigi seigi 398 Aug 20 13:12 authorized_keys $ chmod 600 authorized_keys $ ls -l total 0 -rw------- 1 seigi seigi 398 Aug 20 13:12 authorized_keys 参考 †
|