差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| windows:openssh [2021/06/13 04:06] – [公開/秘密キーのペアの生成] ともやん | windows:openssh [2025/03/13 15:20] (現在) – [scoop で利用可能な OpenSSH の配布形態] ともやん | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== OpenSSH(Open Secure Shell) ====== | ====== OpenSSH(Open Secure Shell) ====== | ||
| + | [[linux: | ||
| ===== インストール ===== | ===== インストール ===== | ||
| 行 7: | 行 8: | ||
| $ scoop install git openssh | $ scoop install git openssh | ||
| </ | </ | ||
| - | < | + | < |
| - | < | + | |
| Installing ' | Installing ' | ||
| Loading PortableGit-2.26.0-64-bit.7z.exe from cache | Loading PortableGit-2.26.0-64-bit.7z.exe from cache | ||
| 行 104: | 行 104: | ||
| Creating shim for ' | Creating shim for ' | ||
| ' | ' | ||
| - | </ | + | </ |
| - | </ | + | |
| pshazz のインストール\\ | pshazz のインストール\\ | ||
| 行 111: | 行 110: | ||
| $ scoop install pshazz | $ scoop install pshazz | ||
| </ | </ | ||
| - | < | + | < |
| - | < | + | |
| Installing ' | Installing ' | ||
| Downloading https:// | Downloading https:// | ||
| 行 133: | 行 131: | ||
| Creating shim for ' | Creating shim for ' | ||
| ' | ' | ||
| - | </ | + | </ |
| - | </ | + | |
| ===== 公開/ | ===== 公開/ | ||
| - | RSA 4096 bit の場合\\ | + | |
| + | ==== RSA 4096 bit の場合 | ||
| + | RSA - Rivest-Shamir-Adleman\\ | ||
| + | [[wpjp> | ||
| <WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
| <code powershell> | <code powershell> | ||
| - | $ cd ~ | + | $ ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa_tomoyan-2020 -C " |
| - | $ ssh-keygen -t rsa -b 4096 -f .ssh\id_rsa_tomoyan-2020 -C " | + | |
| </ | </ | ||
| </ | </ | ||
| 行 147: | 行 147: | ||
| < | < | ||
| Generating public/ | Generating public/ | ||
| - | Enter passphrase (empty for no passphrase): | + | Enter passphrase (empty for no passphrase): |
| - | Enter same passphrase again: | + | Enter same passphrase again: |
| - | Your identification has been saved in .ssh\id_rsa_tomoyan-2020. | + | Your identification has been saved in .ssh/id_rsa_tomoyan-2020. |
| - | Your public key has been saved in .ssh\id_rsa_tomoyan-2020.pub. | + | Your public key has been saved in .ssh/id_rsa_tomoyan-2020.pub. |
| The key fingerprint is: | The key fingerprint is: | ||
| SHA256: | SHA256: | ||
| 行 168: | 行 168: | ||
| </ | </ | ||
| - | ECDSA 521 bit の場合\\ | + | ==== ECDSA 521 bit の場合 |
| + | ECDSA - Elliptic Curve Digital Signature Algorithm\\ | ||
| + | [[wpjp> | ||
| <WRAP prewrap 100%> | <WRAP prewrap 100%> | ||
| <code powershell> | <code powershell> | ||
| - | $ cd ~ | + | $ ssh-keygen -t ecdsa -b 521 -f ~/.ssh/id_ecdsa_tomoyan-2020 -C " |
| - | $ ssh-keygen -t ecdsa -b 521 -f .ssh\id_ecdsa_tomoyan-2020 -C " | + | |
| </ | </ | ||
| </ | </ | ||
| 行 178: | 行 180: | ||
| < | < | ||
| Generating public/ | Generating public/ | ||
| - | Enter passphrase (empty for no passphrase): | + | Enter passphrase (empty for no passphrase): |
| - | Enter same passphrase again: | + | Enter same passphrase again: |
| - | Your identification has been saved in .ssh\id_ecdsa_tomoyan-2020. | + | Your identification has been saved in .ssh/id_ecdsa_tomoyan-2020. |
| - | Your public key has been saved in .ssh\id_ecdsa_tomoyan-2020.pub. | + | Your public key has been saved in .ssh/id_ecdsa_tomoyan-2020.pub. |
| The key fingerprint is: | The key fingerprint is: | ||
| SHA256: | SHA256: | ||
| 行 198: | 行 200: | ||
| </ | </ | ||
| </ | </ | ||
| + | |||
| + | ==== Ed25519 の場合 ==== | ||
| + | Ed25519 - EdDSA - Edwards-curve Digital Signature Algorithm\\ | ||
| + | [[wpjp> | ||
| + | |||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ ssh-keygen -t ed25519 -f ~/ | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | < | ||
| + | Generating public/ | ||
| + | Enter passphrase (empty for no passphrase): | ||
| + | Enter same passphrase again: **************** | ||
| + | Your identification has been saved in .ssh/ | ||
| + | Your public key has been saved in .ssh/ | ||
| + | The key fingerprint is: | ||
| + | SHA256: | ||
| + | The key's randomart image is: | ||
| + | +--[ED25519 256]--+ | ||
| + | | | ||
| + | | ooo + | | ||
| + | | E . o=.* . | | ||
| + | | | ||
| + | | o ..S.ooo+ o | | ||
| + | | . oo ..o oo=.=| | ||
| + | | ..o o .=+=.| | ||
| + | | o. . +oo.| | ||
| + | | .. | ||
| + | +----[SHA256]-----+ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== 公開キーの登録 ===== | ||
| + | <WRAP prewrap 100%> | ||
| + | < | ||
| + | $ cat .ssh/ | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | < | ||
| + | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIQZ2+HYiPH+KFyCtcqSqqe3sCRnPObwv/ | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100%> | ||
| + | < | ||
| + | $ cat ~/ | ||
| + | $ cat ~/ | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | < | ||
| + | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIQZ2+HYiPH+KFyCtcqSqqe3sCRnPObwv/ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== scoop で利用可能な OpenSSH の配布形態 ===== | ||
| + | 2021/06/15 現在、本家である [[https:// | ||
| + | |||
| + | Fedora 34 では openssh-8.6p1-3 がリリースされている。\\ | ||
| + | <WRAP color_mincode> | ||
| + | < | ||
| + | $ dnf info openssh | ||
| + | インストール済みパッケージ | ||
| + | 名前 | ||
| + | バージョン | ||
| + | リリース | ||
| + | Arch : x86_64 | ||
| + | サイズ | ||
| + | ソース | ||
| + | リポジトリー : @System | ||
| + | repo から | ||
| + | 概要 | ||
| + | URL : http:// | ||
| + | ライセンス | ||
| + | 説明 | ||
| + | : commands on a remote machine. SSH is intended to replace rlogin and | ||
| + | : rsh, and to provide secure encrypted communications between two | ||
| + | : untrusted hosts over an insecure network. X11 connections and | ||
| + | : arbitrary TCP/IP ports can also be forwarded over the secure channel. | ||
| + | : | ||
| + | : OpenSSH is OpenBSD' | ||
| + | : it up to date in terms of security and features. | ||
| + | : | ||
| + | : This package includes the core files necessary for both the OpenSSH | ||
| + | : client and server. To make this package useful, you should also | ||
| + | : install openssh-clients, | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | scoop の main bucket の配布状況は以下のような感じである。\\ | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ scoop search openssh | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | ' | ||
| + | git-with-openssh (2.30.1.windows.1) | ||
| + | mls-software-openssh (8.4p1-2) | ||
| + | openssh (8.2p1-1) | ||
| + | win32-openssh (8.1.0.0p1-Beta) | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ scoop info openssh | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | Name: openssh | ||
| + | Description: | ||
| + | Version: 8.2p1-1 | ||
| + | Website: https:// | ||
| + | License: ISC (https:// | ||
| + | Manifest: | ||
| + | C: | ||
| + | Installed: No | ||
| + | Binaries: | ||
| + | findssl.sh.exe usr\bin\scp.exe usr\bin\sftp.exe usr\bin\ssh.exe usr\bin\ssh-add.exe usr\bin\ssh-agent.exe ssh-copy-id.exe usr\bin\ssh-keygen.exe usr\bin\ssh-keyscan.exe usr\bin\sshd.exe | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ scoop info win32-openssh | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | Name: win32-openssh | ||
| + | Description: | ||
| + | Version: 8.1.0.0p1-Beta | ||
| + | Website: https:// | ||
| + | License: BSD-3-Clause (https:// | ||
| + | Manifest: | ||
| + | C: | ||
| + | Installed: No | ||
| + | Binaries: | ||
| + | scp.exe sftp.exe sftp-server.exe ssh-add.exe ssh-agent.exe ssh-keygen.exe ssh-keyscan.exe ssh-shellhost.exe ssh.exe sshd.exe | ||
| + | Notes | ||
| + | ----- | ||
| + | This is a pre-release (non-production ready) | ||
| + | Run 'sudo C: | ||
| + | ssh-agent as a service. | ||
| + | Run 'sudo C: | ||
| + | services. | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ scoop info mls-software-openssh | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | Name: mls-software-openssh | ||
| + | Description: | ||
| + | Version: 8.4p1-2 | ||
| + | Website: https:// | ||
| + | License: ISC (https:// | ||
| + | Manifest: | ||
| + | C: | ||
| + | Installed: No | ||
| + | Binaries: | ||
| + | bin\scp.exe bin\sftp.exe bin\ssh-add.exe bin\ssh-agent.exe bin\ssh-keygen.exe bin\ssh-keyscan.exe bin\ssh.exe | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | [[https:// | ||
| + | <WRAP prewrap 100%> | ||
| + | <code powershell> | ||
| + | $ scoop info git-with-openssh | ||
| + | </ | ||
| + | </ | ||
| + | <WRAP prewrap 100% #result> | ||
| + | <code powershell> | ||
| + | Name: git-with-openssh | ||
| + | Description: | ||
| + | Version: 2.30.1.windows.1 | ||
| + | Website: https:// | ||
| + | License: GPL-2.0-only (https:// | ||
| + | Manifest: | ||
| + | C: | ||
| + | Installed: No | ||
| + | Binaries: | ||
| + | cmd\git.exe cmd\gitk.exe cmd\git-gui.exe git-bash.exe usr\bin\ssh.exe usr\bin\sshd.exe usr\bin\scp.exe usr\bin\sftp.exe usr\bin\ssh-add.exe usr\bin\ssh-agent.exe usr\bin\ssh-keygen.exe usr\bin\ssh-keyscan.exe usr\bin\tig.exe | ||
| + | Environment: | ||
| + | GIT_INSTALL_ROOT=C: | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== 参考文献 ===== | ||
| + | [[qita> | ||
| + | |||
| + | ==== 付録 ==== | ||
| + | [[tw> | ||